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.

Comments

MGN’s picture

Version: 6.x-2.0-beta3 » 6.x-2.x-dev
Status: Active » Fixed
StatusFileSize
new780 bytes

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

pixlkat’s picture

Yes, this fix works for me. My menu shows the active trail as it should. Thanks.

Status: Fixed » Closed (fixed)

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