Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
menu system
Priority:
Critical
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
24 Mar 2014 at 16:37 UTC
Updated:
29 Jul 2014 at 23:28 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
wim leersComment #2
pwolanin commentedWe can't use a cache context here - we have to decide it per block based on what menu name it's rendering.
Example code for getting the numeric active trail:
Implode the active trail, to get up 2 9 ints which can be part of the cache key.
Comment #3
wim leersThanks! :)
This reroll follows pwolanin's guidance, and provides a new
MenuTreeInterface::getActiveTrail()method. Since the code is so similar in the Book module, I also fixed it there in a similar way: a newBookManagerInterface::getActiveTrail().Comment #4
pwolanin commentedIn this context, it should be called something like the materialized path, not the "active trail".
Comment #5
wim leersDiscussed with pwolanin, we settled on
getActiveTrailIds().Comment #6
wim leersWTF, d.o.
Comment #9
pwolanin commentedfixes "Undefined variable: page_not_403"
Comment #10
dawehnerTried to figure out how things really work.
I try to understand that check. What is the primary reason for that? Why should you ever have no route name on a page?
Comment #11
pwolanin commented@dawehner - quite possibly this is a hold-over check from when some paths still used the old router? Also, that condition seems to be met for 404 pages?
Last patch has a bunch of unrelated changes like to EntityResolverManager extends ContainerAware
Comment #12
dawehnerOh yeah, I failed here. Here is a rerole with the interdfiff applied.
Comment #13
wim leerspwolanin & dawehner: who else would be qualified to review this?
Comment #14
wim leersComment #15
danblack commentedAlternate fix perhaps in issue 2224847
Comment #16
catchFor cache hit efficiency this should be worth doing in its own right - the active trail can be identical for many, many different paths on a site.
Comment #17
wim leersIndeed. #15 is nice, but what we do here is much better. From the issue summary:
Comment #18
moshe weitzman commentedReviewed this and it looks really nice. Thanks for refactoring book module into the new system.
Comment #19
catchCommitted/pushed to 8.x, thanks!
Comment #20
wim leersHurray :)