After updating to 6.x-2.0-beta3 my breadcrumbs for nodes which were not in the menu system (set either with node or path breadcrumbs) were not setting the active menu trail even though I had set custom_breadcrumbs_force_active_trail. This had worked in beta2 and earlier versions. It looks like the code was changed a lot between beta2 and beta3 and in custom_breadcrumbs.module at line 348 there is a test of a variable called $set_active_trail. I can't see anyplace this is ever set so the addition of the path item is never added to the $locations array. menu_set_active_trail never gets a filled out $locations array so nothing ever gets set for the active trail.
I assigned $set_active_trail to the value of custom_breadcrumbs_force_active_trail and my active menu trail is once again set. I wasn't sure what was meant by the comment on line 348 but I haven't had any issues since I made the change.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 829268_custom_breadcrumbs_set_active_trail_bug.diff | 780 bytes | MGN |
Comments
Comment #1
MGN commentedThanks for catching this.
I think the attach patch fixes what you are referring to. It seems straightforward enough, so I've already committed the fix to cvs (http://drupal.org/cvs?commit=382228). I would appreciate it if you could test the latest code and verify that this does, in fact, solve the problem.
Comment #2
pixlkat commentedYes, this fix works for me. My menu shows the active trail as it should. Thanks.