joomla-cms
joomla-cms copied to clipboard
Jooa11y plugin correction
Summary of Changes
- Disable page cache on Jooa11y active state
- Disable system caching on Jooa11y active state.
- Load plugin language only if plugin actually runs.
- Remove useless
$directionand$langvars. - Prettify
isAuthorisedDisplayChecker()method
Testing Instructions
Enable Joomla system cache plugin. Ensure that debug is disabled. Clear Joomla cache. Load frontend article as guest. See cache file in /administrator/cache/page folder Edit article in backend and perform "Accessibility Check". See extra file in /administrator/cache/page folder
Actual result BEFORE applying this Pull Request
An extra cache file is generated for each article
Expected result AFTER applying this Pull Request
Cache file is not generated.
Documentation Changes Required
No.
@Denitz you do not need to keep updating your branch. Unless there are conflicts to fix its best if you dont as every commit will reset the test count
Argh, sorry, I didn't know about test count.
I have tested this item :red_circle: unsuccessfully on 74b13e59085656fb54e014f79d8d4fd5861ef46d
I'm afraid I cannot reproduce the issue.
I have tried this:
- Enabling conservative caching
- Enabling both conservative caching and page cache
Accesibility button only appears in frontend when the "show always" check is marked on the plugin configuration.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37068.
@carcam Do you have Joomla debug enabled? Caching is not working in this case, should be disabled.
Hi @Denitz thank you for your reply.
Debug is disabled and attached you may see some relevant screenshots of my current configuration.


Still no luck reproducing the issue in latest code from 4.1-dev branch...
@carcam Not sure what's wrong, but it's really not replicated.
Moreover, assuming that Jooa11y injects assets via onBeforeCompileHead event, these assets can't be cached via view cache (caching in global config) for guests.
But, it's still cached with 'System - Page Cache' enabled for accessibility check preview URL like https://site.com/news/article-alias?jooa11y=1 (see ?jooa11y=1 appended). Having an extra cache file is useless.
I've updated summary of changes and test instructions.
@carcam I found why it's not reproduceable anymore: recently, we have pushed the modules cache update and now the module cache only contains assets added by these module, but not all assets existing at the time of module generation. Before, the article was rendered and cached, next template is rendered, Jooa11y adds own assets via onBeforeCompileHead, next modules were rendered and cached (and the module cache contained Jooa11y assets). Anyway, the cache should be disabled on Jooa11y active state.
I have tested this item :white_check_mark: successfully on 74532452abe6de599be00cfc11108f00f294046b
Hi @Denitz
Thank you very much for rewriting the instructions!!
I have been able to reproduce the issue and after applying the patch no files appear in the cache folder in any case. If that was the intention everything is fine ;).
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37068.
I have not tested this item.
It seems I cannot reproduce the issue.
If I open the article as guest, it creates cache file. Then, when I edit and check in backoffice the extra cache file is not generated (after and before applying patch). I copied the configuration from carcam
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37068.
@brianteeman can you have a look here again if all is ok?
I have tested this item :red_circle: unsuccessfully on 74532452abe6de599be00cfc11108f00f294046b
Cannot replicate the reported problem
Load frontend article as guest. See cache file in /administrator/cache/page folder - YES Edit article in backend and perform "Accessibility Check". See extra file in /administrator/cache/page folder - NO
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37068.
@brianteeman Please ensure that system page cache plugin is enabled and you are not logged in frontend.
pretty sure i set it up exactly as shown in @carcam screenshots but will double check
This pull request has automatically rebased to 4.2-dev.
This pull requests has been automatically converted to the PSR-12 coding standard.
@Denitz Could you make 2 pull requests? One for the refactoring and one for the cache issue? Would be great, thanks.
Sorry, I can't, this PR is simple enough.
This pull request has been automatically rebased to 4.4-dev.
Closed in favour of #41956