Hi,

I just upgraded my DHTML Menu module to the latest stable version, 6.3.2 and instantly got this error message:

warning: Invalid argument supplied for foreach() in path-to-my-website/drupal/includes/menu.inc on line 736.

I then upgraded my Drupal installation to 6.6, deactivated all the contributing modules too see if there were some conflicts. But the error message kept showing up. All menus works properly though. I tried the latest DEV-version too, but no change.

Any thoughts?

Comments

cburschka’s picture

Hi, there's a known bug that may cause your problem too (not certain). Can you try applying the patch in #332947: Do not touch menus where DHTML is disabled. and see if that fixes your issue?

oscarelloo’s picture

Hi, thanks for the quick reply. I patched the module, but I still get the error message.

oscarelloo’s picture

I updated to the DEV version released yesterday, but the error message did not disappear, same one was written out twice actually . So, I returned to the 6.x 2.2 version (released in July) and now everything works fine and there is no error message. Lost some functions provided in the new version, but I'll have to live with that for now.

I tested the latest DEV-version on a brand new Drupal installation and it worked like a charm. So DHTML menu does work well together with something on my site.

Anonymous’s picture

I can confirm that this issue also happens on my site. I traced it down to $has_children being set to 1 (TRUE) even though there are no children. This results in the error when the call to menu_tree_output is made.

I changed line 104 in the DEV version and line 97 in the 6.x-3.2 version within the dhtml_menu_theme_menu_item function:

from : $menu = menu_tree_output($tree);
to : if ($tree) $menu = menu_tree_output($tree);

and this fixed the error.

webel’s picture

> from : $menu = menu_tree_output($tree);
> to : if ($tree) $menu = menu_tree_output($tree);
Confirming this worked for me too, thanks.

cburschka’s picture

Status: Active » Postponed (maintainer needs more info)

Wait, this should have been fixed by #355521: Fatal error: Call to undefined function genesis_menu_item_link() , and be in the -dev package now. Could you update the module again and see if the issue still occurs?

tcmacdonald’s picture

> from : $menu = menu_tree_output($tree);
> to : if ($tree) $menu = menu_tree_output($tree);

I successfully used the same fix for 6.x-3.3.

stuen93’s picture

I had this problem as well but it was fixed by the latest dev version. 6.x-3.x-dev

cburschka’s picture

Status: Postponed (maintainer needs more info) » Fixed

In that case, this is fixed. 6.x-3.4 will be released in the near future.

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

OK FOR SOLUTIONS : for the DHTML MENU 3

I have this error in update mysql on the webserver :

Error in menu.inc line 754 :

I have chanced on file : dhtml_menu_module

the line 83

// Render it...

$menu = menu_tree_output($tree) BAD AND ELIMINATED !!!!

if ($tree) $menu = menu_tree_output($tree); BIG GOOD !
.. and NO ERRORS menu.inc754

Thanks !

Ultrasuoni

DropInTheOcean’s picture

Hi - I also had this error message (noticed after editing a menu). In case it helps anyone, I copied all the details of the menu (Title, Node). Then deleted everything and deleted the menu (luckily there were only three items in the menu!). Then created everything from scratch and the problem went away. (Without having to dig-in to the code)