Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Drupal 7.0 has this (IMO critical) bug that prevents active trails from being added to custom menus. #942782: Custom menus never receive an active trail This is a BIG DEAL. I've already gotten numerous bug reports in the Menu block module issue queue.
But we can work around it with a little code added to menu_block.
Comment | File | Size | Author |
---|---|---|---|
#4 | menu_block_fix.patch | 6.22 KB | arrancia |
Comments
Comment #1
JohnAlbinBonus! Matt Farina wrote up a little module to try to fix this. I'm going to incorporate that code in Menu block.
https://github.com/mattfarina/custom_menu_active_trail
Comment #2
JohnAlbinFixed!
http://drupal.org/cvs?commit=475820
Comment #4
arrancia CreditAttribution: arrancia commentedI guess somethings changed in Drupal core so the fix for adding the custom menus to the menus array still needs but the fix for fixing the custom trail is fixed in Drupal core, so now this fix is causing a bug with i18n module and miltilanguage menu items pointing to same path. It always put the active trail on the first defined menu for a path and does not respect the language so i removed it and it worked gre8. Here is patch if someone can test it it would be awesome.
Comment #5
Dave ReidI don't see that #942782: Custom menus never receive an active trail has actually been committed. Please file a new issue regardless.
Comment #6
arrancia CreditAttribution: arrancia commentedI am new in this drupal story so i dont really understand what you just said. I just found this bug with menu block and multilanguage menu items so i figure out the solution. Either way Menu Blocks on the latest stable drupal works without this function great (with or without multilanguage) so i thought i could share and save some other people two days of debugging.
Comment #7
ergophobe CreditAttribution: ergophobe commentedSince it took me a while to find the relevant commit b/c this is pre-git...
The issue with the patch is here #1017142: except for one menu, all other menus (including books) never receive an active trail and has a link to the commit in msg #7