The menu items consists of <li><a></a></li>, but only the <a> element has the 'active' class (for the active menu item). The active <li> has the active-trail class, but that is not enough. For bootstrap to style correctly the <li> element needs to have the 'active' class.


#3 bootstrap-add_active_class_to_li_elements-1896674-2.patch994 bytesandregriffin
PASSED: [[SimpleTest]]: [MySQL] 0 pass(es).
[ View ]
#1 bootstrap-add_active_class_to_li_elements-1896674-1.patch1008 bytesgeneralredneck
PASSED: [[SimpleTest]]: [MySQL] 0 pass(es).
[ View ]


Status:Active» Needs review
new1008 bytes
PASSED: [[SimpleTest]]: [MySQL] 0 pass(es).
[ View ]

This should take care of the problem. It worked for me.

Status:Needs review» Fixed

Status:Fixed» Needs review
new994 bytes
PASSED: [[SimpleTest]]: [MySQL] 0 pass(es).
[ View ]

Reroll against dev

My bad.

Status:Needs review» Fixed


Status:Fixed» Closed (fixed)

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

Status:Closed (fixed)» Needs work
Issue tags:+needs backport to 7.x-2.x

+++ b/includes/
@@ -90,7 +90,11 @@ function bootstrap_menu_link(array $variables) {
+ if (($element['#href'] == $_GET['q'] || ($element['#href'] == '<front>' && drupal_is_front_page())) && (empty($element['#localized_options']['language']) || $element['#localized_options']['language']->language == $language_url->language)) {

The $language_url variable (towards the end) is actually not defined in this function. Where is it coming from??

Stumbled upon this when refactoring for 8.x-2.x. Would change the version for this issue, but that branch doesn't have a "release" yet. Tagging for backport.

Version:7.x-2.x-dev» 8.x-2.x-dev

Yep, it looks like $language_url is a global variable and should be declared as such in bootstrap_menu_link(), am I correct?

Issue summary:View changes

Doesn't work with Context menu reaction.