If you have a node which is added to the menu via a menu position rule, then the active trail ends in the parent menu where the node is being positioned under. The active trail should end in the node instead.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Sneakyvv created an issue. See original summary.

Sneakyvv’s picture

Title: Default preferred link not added after rule's menu link has been popped of active trail » Default preferred link not added after rule's menu link has been popped off active trail
Version: 7.x-1.1 » 7.x-2.x-dev
Status: Active » Needs review
FileSize
572 bytes

The problem also occurs in latest dev version. Attached patch applies to both 7.x-1.1 and 7.x-2x-dev.

In menu_position_activate_rule the preferred link is already stored. Line 326-328:

  // Get the default preferred link and save it so that it can be used in
  // place of the rule's menu link when menu trees are rendered.
  menu_position_set_link($rule->rid, menu_link_get_preferred());

But it is not being added anywhere. It should be added to the active trail after the rule's menu link is popped off. That is what the patch does.