Autonav does not update when selecting new subpage after upgrade to 5.6.2.1

Permalink
Hi all,

I have a problem after updating from 5.6.0.2 to 5.6.2.1

The autonav element does not update after the first selection. This happens only when not logged in.

So when I select a page in my top menu, the autonav element is updated to reflect that page. If I then select another page, the autonav sticks to the first page clicked. It will not update to the new page.

What to do?

 
JohntheFish replied on at Permalink Reply
JohntheFish
If you have the cache enabled, you could try turning it off and clearing it.
cavendish replied on at Permalink Reply
Turning the cache off worked, but what is the reason for this?
Why does it work on 5.6.0.2 and not on the most recent version?

Cache on is recommended for production sites (which this is).
What is the solution when I want the cache on?

Thanks
mnakalay replied on at Permalink Reply
mnakalay
Actually, once you cleared the cache and the problem went away you should try again with the cache on and see if it works.
cavendish replied on at Permalink Reply
Did that, but the problem comes back. Only when the cache is disabled does it work like intended.

Again, this problem did not exist in 5.6.0.2, but only appeared after we upgraded to 5.6.2.1.

Also, it only appears with users that are not logged in. If you are logged in, then there is no problem.
JohntheFish replied on at Permalink Reply
JohntheFish
The c5 cache has changed considerably since 5.5 and a fair bit since early 5.6.

In particular there is now a 'feature' (I call it a bug) where any block with context sensitive code in the view will not follow its context when the block cache is enabled.

The way the c5 block cache works, there is not an obvious way round this other than turning it off. Unfortunately while the page cache can be page-by-page, the block cache is all or nothing.

The block cache really needs selective control so you can just turn it on or off for specific blocks and pages.

I campaigned to get the core team to commit to selective control of the block cache. Such improvements were acknowledged in Totally Random a few months ago.

Hopefully that will actually come with the next core update, be that 5.7 or 5.6.3 or 5.6.2.2, though I have not noticed any activity on github in that direction. Most big development work at the moment appears to be directed at the 5.7ui.

If you don't want to wait, other than globally turning off the block cache the only suggestion I have is to override the autonav block controller and change the cache parameters defined in it.