User tests: Successful: Unsuccessful:
Pull Request for Issue #46499.
PR #45289 introduced language caching to improve performance. However, it might causes error as described in the plugin #46499 if the cache file is corrupted for some reasons. This PR adds some code to prevent that. In case the included cache file does not return array, the cache file will be deleted so that it will be re-generated.
<?php
defined('_JEXEC') or die;You get fatal error
No error, even if cacch language file is broken
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
| Status | New | ⇒ | Pending |
| Category | ⇒ | Libraries |
| Labels |
Added:
PR-6.0-dev
|
||
I have tested this item ✅ successfully on cada051
| Status | Pending | ⇒ | Ready to Commit |
RTC
Remove admin/cache, language fold+ autoload_psr4.php, copied J601 admin/language and language folder.
Remove admin/cache, language fold+ autoload_psr4.php, copied J601 admin/language and language folder.
@Lacis Please could you expand on your comment to @joomdonation so that we can progress the PR
I wrote how I resolve error, not work front page and admin:
$result = false;
$strings = $this->parse($fileName);
if ($strings !== []) {
$this->strings = array_replace($this->strings, $strings, $this->override);
$result = true;
}
// Record the result of loading the extension's file.
if (!isset($this->paths[$extension])) {
Remove admin/cache including language folder and autoload_psr4.php.
Copied J601 admin/language and language folder joomla ini files. Of course not remove plugins language files.
@Lacis Your response is still not very clear to me. From what I see, you did not make the code change. What actually fixed the issue for you here is you removed administrator/cache folder and the broken cache language file was removed, so the error is gone
This PR solves the root cause of the error. When the cache language file broken, it will be deleted and the system will continue parse and return result of the actual language file, error won't happen anymore
@Bodge-IT This PR can be merged
| Labels |
Added:
RTC
bug
|
||
| Status | Ready to Commit | ⇒ | Fixed in Code Base |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2025-12-11 07:24:10 |
| Closed_By | ⇒ | Bodge-IT |
Thanks @joomdonation for the fix and @exlemor, @alikon for testing.
Thanks to all !
excatly
/../What actually fixed the issue for you here is you removed administrator/cache folder and the broken cache language file was removed, so the error is gone/../
Thanks
I have tested this item ✅ successfully on cada051
I have tested this successfully, Thank you @joomdonation!
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46541.