When I go to a album 4 or more sub-albums deep I get the following error:

"warning: Invalid argument supplied for foreach() in /var/www/includes/menu.inc on line 376."

What is the problem?

CommentFileSizeAuthor
#3 patch 1.1.1.txt85.14 KBdonkasok

Comments

profix898’s picture

Title: warning: Invalid argument supplied for foreach() in /var/www/includes/menu.inc on line 376. » Bug in menu system of D6 causes problems with GalleryMenu

There is a bug in the menu system of Drupal 6. I created an issue for this at http://drupal.org/node/227486 (and a patch that should solve the problem). Can you please apply the patch, rebuild the menu and try again? Thx.

profix898’s picture

http://drupal.org/node/249664 points to the same problem. Anyone tried the patch at http://drupal.org/node/227486?

user warning: Data too long for column 'load_functions' at row 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 ('gallery/%/%/%/%', 'a:4:{i:1;a:1:{s:12:\"gallery_load\";a:2:{i:0;s:4:\"%map\";i:1;s:6:\"%index\";}}i:2;a:1:{s:12:\"gallery_load\";a:2:{i:0;s:4:\"%map\";i:1;s:6:\"%index\";}}i:3;a:1:{s:12:\"gallery_load\";a:2:{i:0;s:4:\"%map\";i:1;s:6:\"%index\";}}i:4;a:1:{s:12:\"gallery_load\";a:2:{i:0;s:4:\"%map\";i:1;s:6:\"%index\";}}}', '', 'gallery_item_access', 'a:1:{i:0;i:4;}', 'gallery_menu_album', 'a:1:{i:0;i:4;}', 16, 5, '', 'gallery/%/%/%/%', '', 't', '', 4, '', '', '', 0, '') in C:\Inetpub\wwwroot\drupal\includes\menu.inc on line 2353.

donkasok’s picture

StatusFileSize
new85.14 KB

I checked whether the comming values are an array...it solves the entire issue.

You can see the patch below.... If you look into line 376 you can see that i added an if loop to check whether its an array. this solves the entire issue for me.Replace your menu with the patch or add an if loop in line 376. Please refer the patch

with regards,
Don

apophis.ch’s picture

Status: Active » Fixed

The Update to Drupal 6.5 fixes this issue for me completly! (and not only with this module)

Anonymous’s picture

Status: Fixed » Closed (fixed)

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