Skip to content
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

[5.2] Fix incorrect error message when failing to rename a file due to an existing destination. #45149

Draft
wants to merge 6 commits into
base: 5.2-dev
Choose a base branch
from

Conversation

krishnaGandhi11
Copy link

@krishnaGandhi11 krishnaGandhi11 commented Mar 17, 2025

Pull Request for Issue #45087,

Summary of Changes:

Testing Instructions

Navigate to the file manager in Joomla where renaming files is possible. (Refer how to reproduce at #45087)

Actual result BEFORE applying this Pull Request

The error messages may appear incorrectly or out of order, causing confusion:
1."Error renaming item." (Correct but unclear without context)
2. "Move file is not possible as destination already exists." (Sometimes redundant or misleading)

Expected result AFTER applying this Pull Request

1st : Error renaming item: Please choose a file name with a-z, A-Z, 0-9, ., - and _.(Avoid Special Characters also name should
not start or end with a period )
2nd : Action not Possible as a file with this name already Exists

  • Ensuring that they do not contradict each other and
    clearly indicate why the operation failed.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

@joomla-cms-bot joomla-cms-bot added Language Change This is for Translators NPM Resource Changed This Pull Request can't be tested by Patchtester PR-5.2-dev labels Mar 17, 2025
@hiteshm0
Copy link

hiteshm0 commented Mar 17, 2025

If im not wrong your PR only changes the grammar of the error messages being shown ?

The second error regarding the file destination already existing shouldn't be shown at all, a file with the same name doesn't exist.
It is likely that it is falling back to a default when there is an error sanitising due to which that error is being shown.

The first error will be shown whenever there is trouble renaming the file not just when there are invalid characters. So you can't just change what that error message says to only apply for this case.

IMO #45145 is a better PR for this issue, Do share your thoughts on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Language Change This is for Translators NPM Resource Changed This Pull Request can't be tested by Patchtester PR-5.2-dev
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants