I am extremely new to Drupal (2 weeks old).

I upgraded to Druapl 6.3 yesterday.
I was notified via administrator menu that dhtml_menu had a new release.

Today, downloaded new dhtml_menu code.
Administrator screen gave me a warning that I needed to update database.

I copied my drupal directory to a backup directory.
I used phpmyadmin to export the entire drupal database.

Clicked on the update, which walked me through putting the system into maintenance and indicated that dhtml_menu has a 6001 update.

Clicked continue, and was patient.

Received the following warnings:

* warning: Invalid argument supplied for foreach() in C:\wamp\www\drupal-6.3\includes\common.inc on line 779.
* warning: strtr() [function.strtr]: The second argument is not an array in C:\wamp\www\drupal-6.3\includes\common.inc on line 796.

These entries were also in the error log.

Your advice on next steps would be appreciated.

Comments

cburschka’s picture

Thank you very much for the complete report. Especially the exact error messages are things that people often leave out, and they make this a lot easier.

First, let me reassure you that DHTML Menu's update functions (including 6001) only work with the relatively simple configuration options of the module so the worst that can happen is that you need to adjust some settings. Secondly, the error messages you got were caused by the function that prints translated messages, and unrelated to the update itself. So the update went fine, and you shouldn't notice any other problems on your site related to this.

Unfortunately, while I know what error would cause these messages, I can't find such an error in my module. Was the dhtml_menu module the only one you updated at this time?

bekasu’s picture

Thank you for your reassurance.

Prior to the dhtml_menu update, I had just activated cck version = "6.x-2.0-rc4"

I have subsequently activated the biblio module version = "6.x-1.0-beta8"

You are correct that dhtml_menus seems to be working fine. I have not noticed any performance issues.

I have not had any cck errors.

I have also activated the following modules today:
Bookmarks
Organic Groups
Advanced Help

I can unload, fresh install, or activate/deactivate modules... whatever would help you diagnose the problem.

I noticed there were several router errors (duplicate entries) as the following example shows:

First duplicate entry following the dhtml_menu errors in the log:

Duplicate entry 'admin/content/node-type/story/display' for key 1 query: INSERT INTO menu_router (path, load_functions, to_arg_functions, access_callback, access_arguments, page_callback, page_arguments, fit, number_parts, tab_parent, tab_root, title, title_callback, title_arguments, type, block_callback, description, position, weight, file) VALUES ('admin/content/node-type/story/display', '', '', 'user_access', 'a:1:{i:0;s:24:\"administer content types\";}', 'drupal_get_form', 'a:2:{i:0;s:35:\"content_admin_display_overview_form\";i:1;s:5:\"story\";}', 31, 5, 'admin/content/node-type/story', 'admin/content/node-type/story', 'Display fields', 't', '', 128, '', '', '', 2, 'modules/cck/includes/content.admin.inc') in C:\wamp\www\drupal-6.3\includes\menu.inc on line 2371.

There were about 70 additional 'duplicate entry errors'. This example is the last one that was generated.

Duplicate entry 'admin/content/node-type/biblio/groups/%/remove' for key 1 query: INSERT INTO menu_router (path, load_functions, to_arg_functions, access_callback, access_arguments, page_callback, page_arguments, fit, number_parts, tab_parent, tab_root, title, title_callback, title_arguments, type, block_callback, description, position, weight, file) VALUES ('admin/content/node-type/biblio/groups/%/remove', 'a:1:{i:5;N;}', '', 'user_access', 'a:1:{i:0;s:24:\"administer content types\";}', 'drupal_get_form', 'a:3:{i:0;s:23:\"fieldgroup_remove_group\";i:1;a:19:{s:4:\"name\";s:6:\"Biblio\";s:6:\"module\";s:6:\"biblio\";s:11:\"description\";s:22:\"Manages bibliographies\";s:4:\"type\";s:6:\"biblio\";s:9:\"has_title\";b:1;s:11:\"title_label\";s:5:\"Title\";s:8:\"has_body\";b:1;s:10:\"body_label\";s:4:\"Body\";s:4:\"help\";s:0:\"\";s:14:\"min_word_count\";i:0;s:6:\"custom\";b:0;s:8:\"modified\";b:0;s:6:\"locked\";b:1;s:9:\"orig_type\";s:6:\"biblio\";s:6:\"is_new\";b:1;s:7:\"url_str\";s:6:\"biblio\";s:6:\"fields\";a:0:{}s:6:\"tables\";a:0:{}s:5:\"extra\";a:3:{s:5:\"title\";a:2:{s:5:\"label\";s:5:\"Title\";s:6:\"weight\";i:-5;}s:10:\"body_field\";a:3:{s:5:\"label\";s:4:\"Body\";s:6:\"weight\";i:0;s:4:\"view\";s:4:\"body\";}s:4:\"menu\";a:2:{s:5:\"label\";s:21:\"Menu settings (admin)\";s:6:\"weight\";i:-2;}}}i:2;i:5;}', 125, 7, '', 'admin/content/node-type/biblio/groups/%/remove', 'Edit group', 't', '', 4, '', '', '', 0, '') in C:\wamp\www\drupal-6.3\includes\menu.inc on line 2371.

bekasu’s picture

In hopes of providing additional information, I just spent time deactivating all modules I've tried over the past 2 days.

Also, I want to clarify. I did not upgrade to drupal 6.3 from a prior version of drupal. I 'upgraded' to drupal from a different cms. Therefore, there was no drupal 6.2 code intially, it has always been drupal 6.3

I have reactivated each of the modules hoping to recreate the 'duplicate entry' errors.

I have been successful in recreating the duplicate entry errors.

Here is what I did:
I deactivated in this order:
Biblio, Bookmarks, Advanced help, Membership, Nice Menus, PDF friendly pages, View, User Relationships, CCK, dhtml_menus.

I reactivated in this order:
dhtml_menus, Biblio, Bookmarks, Advanced help, Membership, Nice Menus, PDF friendly pages, View, User Relationships, CCK.

There were no errors UNTIL I reactivated all of the CCK module entries.

I then deactivated all the CCK module entries and reactivated them one at a time.
The 'duplicate entry' error never occurred.

I followed this with deactivation all the cck modules again.
I then reactivated the cck modules. No errors the 2nd time.

I am sorry that I am unable to consistently recreate the error. If I can help diagnose the problem further, please let me know.

cburschka’s picture

Title: Invalid argument warning:drupal 6.3 & dhtml 6.x-2.2 update » Occasional duplicate menu router items when activating CCK sub-modules
Project: DHTML Menu » Content Construction Kit (CCK)
Version: 6.x-2.2 » 6.x-2.x-dev
Component: Installation » General

Thanks very much! :)

By now, it looks like the error is definitely caused by CCK and not DHTML Menu (at least the one that didn't involve a warning at update), so I'll move it there.

zmove’s picture

I have the same problem, with Drupal 6.3, the latest CCK RC version.... any news about it ?

mzabala’s picture

Drupal 6.3 Clean Install using CCK RC4

I also had pages and pages worth of errors, and high memory usages leading to 500 Internal Server erros (not 100% sure if that was related though I think it was)

Duplicate entry 'admin/build/views/%/preview/%' for key 1 query: INSERT INTO menu_router (path, load_functions, to_arg_functions, access_callback, access_arguments, page_callback, page_arguments, fit, number_parts, tab_parent, tab_root, title, title_callback, title_arguments, type, block_callback, description, position, weight, file) VALUES ('admin/build/views/%/preview/%', 'a:2:{i:3;s:16:\"views_ui_js_load\";i:5;s:19:\"views_ui_cache_load\";}', '', 'user_access', 'a:1:{i:0;s:16:\"administer views\";}', 'views_ui_preview', 'a:2:{i:0;i:3;i:1;i:5;}', 58, 6, '', 'admin/build/views/%/preview/%', '', 't', '', 4, '', '', '', 0, 'sites/all/modules/views/includes/admin.inc') in /home/fishlife/public_html/includes/menu.inc on line 2371.

yched’s picture

admin/build/views/%/preview/% is a Views module path.
I don't think the issue is related to a specific contrib module - the problem seems to be with core menu handling.

yched’s picture

Status: Active » Closed (duplicate)
gpk’s picture

Actually that didn't completely fix it, there is still a big race condition in menu_rebuild. See #333428-15: Duplicate entries in menu_router table (6.x branch)