Language Change bug PR-5.4-dev Pending

User tests: Successful: Unsuccessful:

avatar STUDYHUB02
STUDYHUB02
15 Mar 2025

Pull Request for Issue #45087 .

Summary of Changes

  1. Added an early validation check to detect and block filenames that contain the '$' character.
  2. Updated the language file to include a new language string (COM_MEDIA_ERROR_INVALID_FILENAME) that provides a clear error message when disallowed characters are detected.
  3. These changes ensure that any attempt to rename a file with invalid characters is explicitly rejected, avoiding silent sanitization and user confusion.

Testing Instructions

  1. Open the Media Manager in Joomla.
  2. Test Case 1: Attempt to rename a file using a name composed solely of invalid symbols (e.g., $$$).
    Expected: The operation should immediately fail with the error “Invalid file name.”
  3. Test Case 2: Attempt to rename a file using a name that includes both valid characters and '$' (e.g., abc$$).
    Expected: The operation should be blocked with the same error message, ensuring consistent handling.
  4. Verify that renaming files without any '$' characters works as expected.

Actual result BEFORE applying this Pull Request

  1. When a file is renamed using a name that consists solely of invalid symbols (e.g., $$$), Joomla displays an error indicating that the file name cannot be made safe.
  2. When the file name includes both valid characters and '$' symbols (e.g., abc$$), Joomla silently strips the '$' symbols and renames the file, showing a success message.
  3. This inconsistent behavior can confuse users about what is allowed and what is not.

Expected result AFTER applying this Pull Request

  1. Any attempt to rename a file with a name that contains the '$' character—whether the name is composed solely of '$'
    symbols or mixed with valid characters—will be uniformly blocked.
  2. Users will see a single, clear error message: “Invalid file name.”
  3. This change provides a consistent and clear user experience regarding filename validations in the Media Manager.

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

avatar STUDYHUB02 STUDYHUB02 - open - 15 Mar 2025
avatar STUDYHUB02 STUDYHUB02 - change - 15 Mar 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 15 Mar 2025
Category Administration com_media Language & Strings
avatar STUDYHUB02 STUDYHUB02 - change - 18 Mar 2025
Title
Fix media manager invalid filename
[5.2] Fix media manager invalid filename
avatar STUDYHUB02 STUDYHUB02 - edited - 18 Mar 2025
avatar imejine imejine - test_item - 21 Mar 2025 - Tested unsuccessfully
avatar imejine
imejine - comment - 21 Mar 2025

I have tested this item 🔴 unsuccessfully on 44e5e47

Tested with mixed results;

https://snipboard.io/bofT4D.jpg

After patch, file is not renamed (success), but the error shown is not the expected string/message (fail).


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

avatar SumCompanyInc SumCompanyInc - test_item - 21 Mar 2025 - Tested unsuccessfully
avatar SumCompanyInc
SumCompanyInc - comment - 21 Mar 2025

I have tested this item 🔴 unsuccessfully on 44e5e47

i will say that the filename handling tested successfully, however the language en-GB did not seem to pull the right language translation. it showed the language key token, "COM_MEDIA_ERROR_INVALID_FILENAME" instead of, "Invalid file name."

https://snipboard.io/qUKTOx.jpg


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

avatar Agapiiii
Agapiiii - comment - 21 Mar 2025

The patch Is successful in getting error when renaming a file/folder with a special symbol, but it displays an incorrect error message


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

avatar Agapiiii
Agapiiii - comment - 21 Mar 2025
avatar HLeithner
HLeithner - comment - 15 Apr 2025

This pull request has been automatically rebased to 5.3-dev.

avatar HLeithner HLeithner - change - 15 Apr 2025
Title
[5.2] Fix media manager invalid filename
[5.3] Fix media manager invalid filename
avatar HLeithner HLeithner - edited - 15 Apr 2025
avatar HLeithner
HLeithner - comment - 15 Oct 2025

This pull request has been automatically rebased to 5.4-dev.

avatar richard67 richard67 - change - 2 Nov 2025
Title
[5.3] Fix media manager invalid filename
[5.4] Fix media manager invalid filename
avatar richard67 richard67 - edited - 2 Nov 2025
avatar richard67 richard67 - change - 2 Nov 2025
Labels Added: Language Change bug PR-5.4-dev
avatar richard67 richard67 - alter_testresult - 2 Nov 2025 - SumCompanyInc: Tested unsuccessfully
avatar richard67 richard67 - alter_testresult - 2 Nov 2025 - imejine: Tested unsuccessfully
avatar richard67 richard67 - alter_testresult - 2 Nov 2025 - imejine: Tested unsuccessfully
avatar richard67 richard67 - alter_testresult - 2 Nov 2025 - SumCompanyInc: Tested unsuccessfully
avatar Razzo1987 Razzo1987 - test_item - 23 Jan 2026 - Tested unsuccessfully
avatar Razzo1987
Razzo1987 - comment - 23 Jan 2026

I have tested this item 🔴 unsuccessfully on 840b384

Missing language string:

image
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45141.
avatar brianteeman
brianteeman - comment - 23 Jan 2026

@richard67 can you update this PR with the missing language string. The op has clearly abandoned this so it will never get fixed and will stay stuck here for another year

avatar richard67
richard67 - comment - 23 Jan 2026

@richard67 can you update this PR with the missing language string. The op has clearly abandoned this so it will never get fixed and will stay stuck here for another year

@brianteeman Done.

avatar brianteeman
brianteeman - comment - 23 Jan 2026

I have tested this PR and it does exactly what it says but thats not enough. It only addresses the invalid character $ but the exact same problem exists for lots of other invalid characters such as # @ * and many more. It should be checking for all invalid characters not just the $

This was already mentioned in the original bug report #45087 (comment)

avatar brianteeman brianteeman - test_item - 23 Jan 2026 - Tested unsuccessfully
avatar brianteeman
brianteeman - comment - 23 Jan 2026

I have tested this item 🔴 unsuccessfully on d48bfe9


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

avatar brianteeman
brianteeman - comment - 23 Jan 2026

@richard67 as the original author has clearly "gone away" and this PR doesn't address the problem correctly I recommend closing this PR and re-opening the original issue

avatar muhme
muhme - comment - 27 Jan 2026

@STUDYHUB02 Thank you for your work so far. Would you like to continue working on this PR, or if not, could you please close it? If we do not receive a response, we will close this PR after two weeks.

avatar laoneo
laoneo - comment - 27 Jan 2026

This change should be made in the local adapter and not in the model. It is very likely that cloud providers do accept the $ sign in file names.

avatar Fedik
Fedik - comment - 27 Jan 2026

The changes in this PR does not make any sense. I would suggest to close it.

Add a Comment

Login with GitHub to post a comment