If I create a context that sets an active menu, an active class gets added to the menu link.
This happens even if it's the current page, which means the link ends up with two active classes as the l() function adds one as well.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Leon Kessler’s picture

The context_preprocess_menu_link function should check whether the link is the current path, and only add the class if it isnt.

Leon Kessler’s picture

Status: Active » Needs review
hass’s picture

Version: 7.x-3.0-beta4 » 7.x-3.x-dev
Issue summary: View changes
Status: Needs review » Needs work

Can you verify if latest changes may fixed the issue and if not re-role. A re-role is required for sure.

hass’s picture

Your code fails if you have views tabs. On the base tab at path "/foo" it works, but not not with "/foo/bar".

  • hass committed 74d41a8 on 7.x-3.x
    Issue #1828018 by hass: Duplicate 'active' classes are added if it's the...
hass’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

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