Problem/Motivation
Right now, wse_menu.active_trail decorates menu.active_trail. But, WseMenuActiveTrail extends MenuActiveTrail, meaning that the decoration breaks if any other decorator is added.
Steps to reproduce
Proposed resolution
Make WseMenuActiveTrail implement MenuActiveTrailInterface without extending the base class. This allows for proper decoration.
Final resolution
Stop decorating MenuActiveTrail and decorate cache.menu instead, since the only reason for dectorating menu.active_trail was to add the active workspace ID to the cache ID, which we can more easily do with cache.menu.
This has the side-effect of segmenting the cache for menu.tree_storage also, which seems to be the right thing to do there as well.
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork wse-3559780
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
alecsmrekar commentedI posted a PR, and here are some test steps for it:
$settings['cache']['bins']['menu'] = 'cache.backend.database';Comment #4
alecsmrekar commentedComment #5
alecsmrekar commentedComment #6
alecsmrekar commentedComment #10
alecsmrekar commentedThis is a much better solution, thanks Gabe!
Comment #11
alecsmrekar commentedComment #12
amateescu commentedUpdating title based on the new approach.
Comment #15
amateescu commentedMerged, thanks!
Comment #17
gabesullice