No Code Attached Yet
avatar efrancis
efrancis
15 Dec 2021

Steps to reproduce the issue

Upgrade to 3.10.4
Go to System → Global Configuration → System
Set System Cache to "ON - Progressive caching"
In the front end click on a menu item other than the one currently active

Expected result

The menu item that was clicked on should now get the "active" class and as such allow CSS to highlight it

Actual result

The previously selected menu item will remain active, even though the content of the newly selected item is displayed

System information (as much as possible)

Tested and confirmed on 4 different sites as soon as 3.10.3 was upgraded to 3.10.4. My server uses PHP 7.4.

Additional comments

Clearing cache and making the directory cache/com_modules unwritable solves the problem.
Setting cache to "conservative caching" also solves the problem
Disabling the cache in the menu module DOES NOT solve th problem strangely (but that might be a different bug)

avatar efrancis efrancis - open - 15 Dec 2021
avatar joomla-cms-bot joomla-cms-bot - change - 15 Dec 2021
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 15 Dec 2021
avatar sozzled
sozzled - comment - 15 Dec 2021

Confirmed by my own testing. Enabling progressive caching messes with the CSS for the active menu item.

avatar HLeithner
HLeithner - comment - 15 Dec 2021

possible reason is this commit 7b77776 with the nice name "fix" which leads to #35528

it changes the caching from the complete object to the object class only at
7b77776#diff-1f3d4b0ff411d275d94c1538ef487ef75d4450d772ad2cf712b5796467917f6dR475

which would mean no module variables are honored any more, at least that could be the reason for this.

can you please change the line back to the original code
$hash = md5(serialize(array($name, $attribs, null, $renderer)));
file: libraries/src/Document/HtmlDocument.php in line 475

avatar micker
micker - comment - 15 Dec 2021

i confirm bug on 4.0.3

avatar HLeithner
HLeithner - comment - 15 Dec 2021

@micker can you test what I wrote?, it's the same in 4.0.3 maybe different line

avatar efrancis
efrancis - comment - 15 Dec 2021

@HLeithner I just tried replacing line 475 in libraries/src/Document/HtmlDocument.php to what you suggested and I confirm that fixes the problem.

avatar Fedik
Fedik - comment - 15 Dec 2021

Joomla 4.0 issue was already reported #36102 and fix is there #36193, please test.
It can be back-ported to 3.10

Disabling the cache in the menu module DOES NOT solve th problem strangely (but that might be a different bug)

It not a bug, this option works only for "conservative caching".
"Progressive caching" caches a whole position (with all modules in it) instead of each module (as it done with "conservative caching").

avatar Fedik Fedik - change - 15 Dec 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-12-15 17:25:16
Closed_By Fedik
avatar Fedik Fedik - close - 15 Dec 2021
avatar Fedik
Fedik - comment - 15 Dec 2021

Please test #36324

avatar efrancis
efrancis - comment - 15 Dec 2021

@Fedik I tested the fix #36324 and confirm that it works as expected

avatar Fedik
Fedik - comment - 15 Dec 2021

Please set your test result here https://issues.joomla.org/tracker/joomla-cms/36324
With this button ;)
image

Add a Comment

Login with GitHub to post a comment