Closed (fixed)
Project:
Menu Position
Version:
7.x-2.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Feb 2012 at 21:20 UTC
Updated:
15 Mar 2012 at 19:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
C. Lee commentedI have the same issue. The following issues seem relevant:
http://drupal.org/node/942782 [core] Custom menus never receive an active trail
http://drupal.org/node/1425342 [menu_block] Drupal core upgrade from 7.10 to 7.12 causes menu block to fail
http://drupal.org/node/1351678 [i18n] Follow menu_link_get_preferred active trail handling for custom menus
Comment #2
craigjones commentedI've encountered this same issue today as well, and have done a bit of digging.
It appears that menu_position_activate_rule() grabs the cache created by menu_link_get_preferred() (via drupal_static() ) and then attempts to rewrite the entries. However, the internal structure of the cache in menu_link_get_preferred() has been altered between versions, so the keys in the cache are different thus the rewriting creates an invalid array, that when menu_get_active_trail() is later called, returns just the top-level entry as a result.
Attached is a patch against 7.x-1.0
Comment #3
C. Lee commentedApplied the patch in #2. Now the breadcrumbs are showing correctly, yet my menu block is still not appearing. I cannot confirm whether the bug is in Menu position, Menu block, or the Internationalization.
Comment #4
tomcashman commented#2 works for me, patched against Menu Position 7.x-1.0 and running alongside Menu Block 7.x-2.3. Thanks!
Comment #5
hyperglide commented#2 works for me -- fixes breadcrumb.
Comment #6
C. Lee commentedNow #2 works for me too; it was setting "Menu" as <the menu selected by the page> at the block configuration page that caused my problem.
Comment #7
gaele commentedComment #8
tekket commented#2 fixed my breadcrumbs. Great job craigjones.
Comment #9
dave reidYep agreed this is RTBC.
Comment #10
johnalbinFixed! http://drupalcode.org/project/menu_position.git/commitdiff/bc6c700
Thanks, everyone!
Comment #11
gsquirrelAny chance this patch could be applied to the 7.x-1.0 version? Applying it manually sorted out the issues i was having after the core upgrade.
Comment #12
mgifford@craigjones - can help explain why your patch works?
I'm not actually using Menu Permissions, but trying to figure out how you fixed this issue with the active trail.
The patch is simple, but I'm not sure what [MENU_PREFERRED_LINK] relates to.
Thanks!