RTC bug PR-6.0-dev Pending

User tests: Successful: Unsuccessful:

avatar joomdonation
joomdonation
6 Dec 2025

Pull Request for Issue #46499.

Summary of Changes

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.

Testing Instructions

  • Uses Joomla 6
  • Look at administrator\cache\language folder, find the file administrator-language-en-GB-plg_system_guidedtours.ini.XYX.php, edit it, change the content to just the code below to make it broken:
<?php
defined('_JEXEC') or die;
  • Access to administrator area of your site. You should see fatal error

Actual result BEFORE applying this Pull Request

You get fatal error

Expected result AFTER applying this Pull Request

No error, even if cacch language file is broken

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 - 6 Dec 2025
avatar joomdonation joomdonation - change - 6 Dec 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 6 Dec 2025
Category Libraries
cada051 6 Dec 2025 avatar joomdonation CS
avatar joomdonation joomdonation - change - 6 Dec 2025
Labels Added: PR-6.0-dev
avatar exlemor exlemor - test_item - 6 Dec 2025 - Tested successfully
avatar exlemor
exlemor - comment - 6 Dec 2025

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.

avatar alikon alikon - test_item - 7 Dec 2025 - Tested successfully
avatar alikon
alikon - comment - 7 Dec 2025

I have tested this item ✅ successfully on cada051


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

avatar alikon alikon - change - 7 Dec 2025
Status Pending Ready to Commit
avatar alikon
alikon - comment - 7 Dec 2025

RTC


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

avatar Lacis
Lacis - comment - 7 Dec 2025

Remove admin/cache, language fold+ autoload_psr4.php, copied J601 admin/language and language folder.

avatar joomdonation
joomdonation - comment - 8 Dec 2025

@Lacis Your last comment is not very clear. Could you please explain more details about it?

avatar Bodge-IT
Bodge-IT - comment - 10 Dec 2025

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

avatar Lacis
Lacis - comment - 10 Dec 2025

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.

avatar joomdonation
joomdonation - comment - 11 Dec 2025

@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

avatar QuyTon QuyTon - change - 11 Dec 2025
Labels Added: RTC bug
avatar Bodge-IT Bodge-IT - change - 11 Dec 2025
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
avatar Bodge-IT Bodge-IT - close - 11 Dec 2025
avatar Bodge-IT Bodge-IT - merge - 11 Dec 2025
avatar Bodge-IT
Bodge-IT - comment - 11 Dec 2025

Thanks @joomdonation for the fix and @exlemor, @alikon for testing.

avatar joomdonation
joomdonation - comment - 11 Dec 2025

Thanks to all !

avatar Lacis
Lacis - comment - 11 Dec 2025

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

Add a Comment

Login with GitHub to post a comment