? ? Pending

User tests: Successful: Unsuccessful:

avatar zero-24
zero-24
24 May 2017

Pull Request for Issue #16238

Summary of Changes

In some broken hosting envoirments both mime checker tools are not enabled. In that case show that message with more extended info.

Testing Instructions

  • Try this on a broken hosting.

  • confirm the extended message

  • review the text.

Expected result

Extended text explaining what is happening

Actual result

Just a general message which is not longer match the usage.

Documentation Changes Required

None

avatar zero-24 zero-24 - open - 24 May 2017
avatar zero-24 zero-24 - change - 24 May 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 24 May 2017
Category Administration Language & Strings
avatar mbabker
mbabker - comment - 24 May 2017

This needs to be crafted carefully. This message might be appropriate for the site owner who would be the primary POC regarding server configurations, but for a general user of the site this is too much information (they shouldn't be seeing a message saying "this server is incorrectly configured" basically, and that's what this message says).

avatar zero-24
zero-24 - comment - 24 May 2017

I'm happy to accept a better suggestion. Maybe we show a different message in frontend and backend?

avatar brianteeman
brianteeman - comment - 24 May 2017

yes if possible to have a different message on the frontend that would be better

also please change him to them to make it gender neutral.

I will wait to here if the message can be split before commenting on the text itself

avatar mbabker
mbabker - comment - 24 May 2017

The error message needs to be somewhat vague as to the cause of the issue still (the user just needs to know the upload failed, not everyone needs to know the technical reasoning for the failure), but we should be making it possible for site owners to get more information about why the issue happened. Long and short, we need to start making more liberal use of our logging system and stop expecting that the only way to get information about an error state is through messages displayed to the user in the alert container.

So a message displayed in the UI should basically say not much more than "could not upload file because the MIME type could not be determined". A supplemental JLog::add() call should be used to log additional details (upload of X file failed because the MIME type could not be determined).

avatar zero-24
zero-24 - comment - 24 May 2017

I will wait to here if the message can be split

Yes it can as we have different language files for backend and frontend.

avatar brianteeman
brianteeman - comment - 24 May 2017

first attempt

Frontend

+JLIB_MEDIA_ERROR_WARNINVALID_MIME="We were unable to upload this file."

Backend

+JLIB_MEDIA_ERROR_WARNINVALID_MIME="We could not detect the mime type for this file. For security purposes this file has not been uploaded. Please contact your host and to check that mime_content_type or the fileinfo extension is enabled in php."

avatar zero-24 zero-24 - change - 24 May 2017
Labels Added: ? ?
avatar zero-24
zero-24 - comment - 24 May 2017

done with the last commit.

avatar Quy
Quy - comment - 24 May 2017

I prefer not to not use We were and We could since we don't use We in the other strings.

How about?

Unable to upload this file.

Unable to detect mime type for this file. For security purposes have not uploaded this file. Please contact your host and to check that mime_content_type or the fileinfo extension is enabled in PHP.

avatar brianteeman
brianteeman - comment - 24 May 2017

i was trying to be more friendly - but if not then

Unable to upload this file.

Unable to detect the mime type for this file. For security purposes this file has not been uploaded . Please contact your host and check that the mime_content_type or the fileinfo extension is enabled in PHP.

avatar zero-24
zero-24 - comment - 24 May 2017

pushed thanks

avatar Quy
Quy - comment - 24 May 2017

i was trying to be more friendly - but if not then

I totally understand. Just going for consistency sake.

11a71e9 24 May 2017 avatar zero-24 fixes
avatar Quy
Quy - comment - 24 May 2017

How about removing this file from the 1st sentence since it is mentioned (redundant) in the second sentence?

Unable to detect the mime type. For security purposes this file has not been uploaded. Please contact your host and check that the mime_content_type or the fileinfo extension is enabled in PHP.

avatar brianteeman
brianteeman - comment - 24 May 2017

Fine by me

avatar brianteeman
brianteeman - comment - 25 May 2017

I have tested this item successfully on 11a71e9

on review


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16246.

avatar brianteeman brianteeman - test_item - 25 May 2017 - Tested successfully
avatar brianteeman
brianteeman - comment - 25 May 2017

just had a thought and running for a train so cant test BUT is this message also displayed when you are trying to upload an file that is not in the allowed mime types that are saved in the com-media options? If so then this new message is not correct

avatar zero-24
zero-24 - comment - 25 May 2017

No than we have a differnent message that also include the detected mime type.
This message is only displayed if we could not detect a mimetype and this means that both methos are not enabled.

avatar brianteeman
brianteeman - comment - 25 May 2017

ok all good then

avatar Quy
Quy - comment - 25 May 2017

I have tested this item successfully on 11a71e9


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16246.

avatar Quy Quy - test_item - 25 May 2017 - Tested successfully
avatar franz-wohlkoenig franz-wohlkoenig - change - 25 May 2017
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 25 May 2017

RTC after two successful tests.

avatar mbabker
mbabker - comment - 25 May 2017

I am still going to be insistent that the UI does not use an error message that says "you need X PHP extension/function enabled". That comment is only beneficial if the only user who may see it is the site owner or can manage their server configuration.

avatar brianteeman
brianteeman - comment - 25 May 2017

@mbabker are the people who can see that message different to the people who can see the php update message?

avatar mbabker
mbabker - comment - 25 May 2017

Depending on how you have the plugin configured or your site's ACL, yes, it could be a different group.

avatar rdeutz rdeutz - change - 25 May 2017
Status Ready to Commit Needs Review
Labels
avatar rdeutz
rdeutz - comment - 25 May 2017

seems to me not really discussed how it should be, state set to "needs review"


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16246.

avatar rdeutz rdeutz - change - 27 May 2017
Labels
avatar zero-24
zero-24 - comment - 13 Aug 2017

I'm closing here as it looks like we can not find a consense here. Thanks.

avatar zero-24 zero-24 - change - 13 Aug 2017
Status Needs Review Closed
Closed_Date 0000-00-00 00:00:00 2017-08-13 14:12:43
Closed_By zero-24
avatar zero-24 zero-24 - close - 13 Aug 2017

Add a Comment

Login with GitHub to post a comment