So I know that this is really a problem with Drupal core, but on some of our pages which were in 'Primary Links' menu tree structure, menu_get_active_menu_name() was returning 'navigation'. Can't really tell you how to replicate.

We find that inserting a bit of code from ctools that checks to see whether the menu trail was set to 'navigation', and then fixing it, if it was set improperly, worked to fix what Drupal was handing the context. That is, it always returns 'primary links' if that menu item is in the primary links menu.

This behavior on the part of Drupal may explain some of the bugs in your queue, and may fix some of the mysterious behavior that people are blaming on context, and subsequently posting bug reports. ;)

Anyhow, I've got a patch here, with the method.

CommentFileSizeAuthor
context_menu_set_active_trail.patch1.05 KBglass.dimly

Comments

brynbellomy’s picture

yhahn’s picture

Version: 6.x-3.0-beta4 » 6.x-3.x-dev
Assigned: Unassigned » yhahn
Priority: Normal » Critical
yhahn’s picture

Status: Needs review » Fixed
yhahn’s picture

Status: Fixed » Closed (fixed)

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