Language Change PR-6.0-dev Pending

User tests: Successful: Unsuccessful:

avatar joomdonation
joomdonation
7 Dec 2025

Pull Request for Issue # .

Summary of Changes

This PR improves the robustness of Joomla’s language cache handling. Currently, if a language cache file is only partially written (e.g., due to low disk space, write interruption, or unexpected I/O failure), the corrupted cache file will remain on disk. On the next request, Joomla attempts to include this broken file, which may lead to PHP errors, warnings, or unexpected behavior.

This PR introduces safer handling of such scenarios by:

  • Removing the corrupted cache file immediately when the write operation fails, ensuring Joomla does not load an invalid cache file in future requests.
  • Logging the failure so administrators can see errors from log if needed.

Testing Instructions

I could not find an easy way to make this operation fail on normal condition. So you can just perform simple test below:

  • Use Joomla 6.0
  • Apply patch
  • Delete language cache folder (administrator\cache\language)
  • Access to your site again, make sure there is no error
  • Check language cache folder (administrator\cache\language) and make sure the cache files still being created as before.

Actual result BEFORE applying this Pull Request

Works, with potential errors if cache file is partially written

Expected result AFTER applying this Pull Request

Works, no potential errors

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 joomdonation joomdonation - open - 7 Dec 2025
avatar joomdonation joomdonation - change - 7 Dec 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 7 Dec 2025
Category Administration Language & Strings Libraries
avatar joomdonation joomdonation - change - 7 Dec 2025
Labels Added: Language Change PR-6.0-dev
avatar exlemor exlemor - test_item - 8 Dec 2025 - Tested successfully
avatar exlemor
exlemor - comment - 8 Dec 2025

I have tested this item ✅ successfully on 7fa9554

I have successfully tested this.

(In case this is important (I doubt it): when going back into the backend and clicking around, the number of cache files that come back into the administrator/cache/language directory is not always the same initially...) most of the time it's 78 or 90, but sometimes its 58, and eventually climbs up to 120.


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

Add a Comment

Login with GitHub to post a comment