When I try to edit the primary links ( admin/build/menu-customize/primary-links ), I get a fatal error. I'm having trouble figuring out what caused it, if i caused it, etc. It was working recently. Can anyone help? Here's the full error:

( ! ) Fatal error: Unsupported operand types in /home/mattgilbert/workspace/drupal-6-3/includes/common.inc on line 1542
Call Stack
# Time Memory Function Location
1 0.0001 59360 {main}( ) ../index.php:0
2 0.0917 1202696 menu_execute_active_handler( ) ../index.php:18
3 0.0964 1217572 call_user_func_array ( ) ../menu.inc:348
4 0.0964 1217684 drupal_get_form( ) ../menu.inc:0
5 0.0965 1217964 call_user_func_array ( ) ../form.inc:102
6 0.0965 1218084 drupal_retrieve_form( ) ../form.inc:0
7 0.0965 1219236 call_user_func_array ( ) ../form.inc:366
8 0.0965 1219292 menu_overview_form( ) ../form.inc:0
9 0.1039 1275400 _menu_overview_tree_form( ) ../menu.admin.inc:45
10 0.1468 1302352 l( ) ../menu.admin.inc:72

Comments

mattgilbert’s picture

ok, i know what caused it. to recreate:

  1. In a custom menu, add a link with an anchor thing in the path, for example: #gallery
  2. Save it
  3. Edit it to a regular path such as "section/galleries" (assuming that's a valid path).
  4. Save it. Already there's a problem, as the "#" part is added to the end of the path on your new link.
  5. While trying to get rid of that "#" part, I eventually hand-edited the database (so yes, i was being reckless there)

That's when the menu admin page started creating errors. What eventually fixed it was editing the "options" field for that link in the "menu_links" table so something typical like a:1:{s:10:"attributes";a:1:{s:5:"title";s:0:"";}}

I'm guessing this is an issue with how Drupal's core updates edited menu links. I'm using Drupal 6.10

boclodoa’s picture

Hi

I have the same problem, since I've been reading about this problem I think there is one of my custom modules that is not correctly migrated to drupal 6, but I don't know which one ¿can you tell me what to do for getting the "call Stack" you have"?

Thanks in advance

phor’s picture

How can I fix this problem without botching around within the MySQL Database?!

I updated my Drupal Installation several times to keep it up to date and so secure! Now having installed 6.12.