-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[6.0] Prevent error when cache of language file broken #46541
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
base: 6.0-dev
Are you sure you want to change the base?
[6.0] Prevent error when cache of language file broken #46541
Conversation
|
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. |
|
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. |
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46541. |
|
Remove admin/cache, language fold+ autoload_psr4.php, copied J601 admin/language and language folder. |
|
@Lacis Your last comment is not very clear. Could you please explain more details about it? |
@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; Remove admin/cache including language folder and autoload_psr4.php. |
|
@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 |
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
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