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.

CommentFileSizeAuthor
#4 menu_block_fix.patch6.22 KBarrancia
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

JohnAlbin’s picture

Bonus! 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

JohnAlbin’s picture

Assigned: JohnAlbin » Unassigned
Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

arrancia’s picture

Status: Closed (fixed) » Active
FileSize
6.22 KB

I 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.

Dave Reid’s picture

Status: Active » Closed (fixed)

I don't see that #942782: Custom menus never receive an active trail has actually been committed. Please file a new issue regardless.

arrancia’s picture

I 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.

ergophobe’s picture

Since 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