-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add source & dest to copy/move errors #6644
Conversation
If we aren't using the old strings anymore can we deprecate them please? Otherwise come Joomla 4.0 it's going to be horrendus to work out what strings we are and aren't using. Plus it makes it harder for developers to know what strings to do |
@@ -260,6 +261,7 @@ JLIB_FILESYSTEM_ERROR_UPLOAD="JFile: :upload: %s" | |||
JLIB_FILESYSTEM_ERROR_WARNFS_ERR01="Warning: Failed to change file permissions!" | |||
JLIB_FILESYSTEM_ERROR_WARNFS_ERR02="Warning: Failed to move file!" | |||
JLIB_FILESYSTEM_ERROR_WARNFS_ERR03="Warning: File %s not uploaded for security reasons!" | |||
JLIB_FILESYSTEM_ERROR_WARNFS_ERR04="Warning: Failed to move file: %s => %s" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sovainfo can you use here also %1s => %2s
😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zero-24 Thanks
Added sequence numbers for the parameters as pointed out by @zero-24
Where is the documentation on deprecating messages? |
There is no documentation for deprecating language strings. I did propose something but this was rejected. @wilsonge How do you propose to deprecate the strings. The problem is that the stupid ancient way that TT are given strings to translate will not be able to show if a string is deprecated This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6644. |
Considering there is no documentation on deprecating language string, this PR should be set to RTC. With special thanks to @davdebcom, @designbengel and @infograf768 |
Test instructions from @wilsonge From what I understand you need to install an extension when having not enough file permissions in the components (or some folder that's needed as described in the link in the description) to move files into the directory. Before the patch you'll just see a message "Copy file failed" and after you'll see a message stating what the to and from directory are. This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6644. |
I have tested this item ✅ successfully on bd27a90 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6644. |
Not sure I understand the messages:
what is Should not the message says Also, I would use |
Valid point about using to On 7 April 2016 at 11:22, infograf768 notifications@github.com wrote:
Brian Teeman |
@infograf768 That path is the temporary path & name that whatever file you tried uploading gets sent to by PHP before the underlying code ultimately moves it into place. JFile doesn't know what the name of the file you tried uploading, only what the source path it's located at is, so that's all the message can display when rendered from there. To get a message like what you're looking for, it would need to be rendered by the method processing the upload as that will have access to the data extracted from the |
This PR has received new commits. CC: @mikeveeckmans This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6644. |
This PR has received new commits. CC: @mikeveeckmans This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6644. |
Why create a new string JLIB_FILESYSTEM_ERROR_WARNFS_ERR04 instead of updating JLIB_FILESYSTEM_ERROR_WARNFS_ERR02 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6644. |
@mbabker Btw, |
Source is only "not understandable" if you're moving something from a temporary location with a temporary file name. JFile doesn't know whether it's been told to move something from the temporary location or told to move the index.php file to new.php. So basically if you say hide it because some paths may look like gibberish then you have to not show the source path for all cases. |
This PR corrects the mistake by core code of being too abstract. When something goes wrong it is not good enough to report something went wrong. You need to provide sufficient details in order to investigate the cause of whatever went wrong. Would be nice if Joomla was made so robust it would tell the cause, can't wait for that! In the mean time it would be helpful when Joomla provides sufficient details so you can investigate what the cause is. The fact core code is wrongly using the original messages doesn't mean any code using it is wrong. So, the core code must be changed to use a different message. Haven't found the new message, so it needed to be created. Obviously, any code making the same mistake can be corrected the same way. Correct usage of the message doesn't need any change! |
I have tested this item ✅ successfully on 1755915 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6644. |
I have tested this item ✅ successfully on 1755915 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6644. |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6644. |
Still fighting with github to make it do what we want. Doesn't allow me to add changes to this pr.