0

Im getting the following error when visting the root of my Drupal 7 project after updating the sites bootstrap theme from 7.30 to 7.35.

Notice: Undefined index: element in bootstrap_menu_link() (line 22 of /Users/Chris/Sites/iss-mw/sites/all/themes/bootstrap/templates/menu/menu-link.func.php).
Recoverable fatal error: Argument 3 passed to l() must be of the type array, null given, called in /Users/Chris/Sites/iss-mw/sites/all/themes/bootstrap/templates/menu/menu-link.func.php on line 52 and defined in l() (line 2481 of /Users/Chris/Sites/iss-mw/includes/common.inc).

Seems to be some issue with the menu-link.func. Anyone know what this could be?

Cheers!

  • Two questions: have you cleared menu cache? If you log the menu items that are giving the errors, are all menu items giving this or just some, especially those that are not suppose to be shown? – squall3d May 7 '16 at 17:04
0

This is probabbly not related to bootstrap theme itself, because the function bootstrap_menu_link() is the same in both versions. As I can see the error is because the element key is empty

22. $element = $variables['element']

So, when the the function try to call the l() function, throw an error fatal, because is expecting an array as 3rd argument

52. $element['#title'] = l($element['#title'], $element['#href'], $element['#localized_options']);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.