2

I'm having a problem with one of our existing Drupal 6 websites where if you go to Build > Menu > Primary Links it causes 500 error.

The error message is: Fatal error: Unsupported operand types in /var/www/sitename/htdocs/includes/common.inc on line 1632 which is corresponding to the function L which creates links, and particularly the part that says:

// Merge in defaults.
$options += array(
  'attributes' => array(),
  'html' => FALSE,
);

Which basically means, as I understand, $options is set but it's not an array.

So I've further investigated the problem, and dpm'd the menu tree to investigate, and found one link in the tree array to have localized_options set to (boolean) FALSE where all other links had an array as localized_options.

Now I'm wondering where this FALSE could come from, and how to correct it? Obviously I don't want to hack the default menu.module and set a check for boolean, so I'm looking for the proper solution and the origin of the issue.

The link was probably (- because I don't enter the site's content) put in manually through the admin interface, so it's not a custom module hook_menu link or anything. I've tried looking in {menu_links} and {menu_router} tables in MySQL Workbench but I have no idea where the localized_options comes from. It could be on of the serialized data in the table.

  • So I've managed to find a temporary workaround by editing the menu item by directly typing in the path admin/build/menu/item/6813/edit and setting a "Title" attribute so that the localized_options array won't be empty. This works for now, but in the future I'd like to avoid a similar situation so I'm still looking for an answer. – Beebee Apr 10 '13 at 12:02
  • The instructions from drupal.org/node/362799#comment-1542118 (as linked in drupal.stackexchange.com/questions/24086/… ) might be of use. The whole discussion is a fruitful read as well. – kekkis Apr 11 '13 at 10:58

Your Answer

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

Browse other questions tagged or ask your own question.