Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
The box says "warning: Invalid argument supplied for foreach() in /home/drupal/includes/menu.inc on line 743.".
Disabling the DHTML Menu module in /admin/build/modules makes the box go away.
Comment | File | Size | Author |
---|---|---|---|
#30 | bug.png | 17.57 KB | ekorich |
#16 | dhtml-no_array-6.x.patch | 391 bytes | AlexisWilke |
#13 | dhtml_menu.zip | 3.03 KB | pimentoski |
#7 | Page1.jpg | 92.77 KB | sanjanaa |
#7 | Page2.jpg | 53.19 KB | sanjanaa |
Comments
Comment #1
TomChiverton CreditAttribution: TomChiverton commentedRolling back to 3.4 also removes the error
Comment #2
cburschkaAnother annoying traversal issue, likely caused by another buggy contrib module. I don't know what it's caused by, but I can stop the warning from appearing.
Comment #3
silurius CreditAttribution: silurius commentedI can confirm that this patch corrects the problem. Thanks, Arancaytar.
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedConfirmed that this patch removes the error.
Comment #5
silurius CreditAttribution: silurius commentedI'm not sure why, but somehow the message resurfaced again after I applied the patch above, and I had to reapply it. Hopefully it was user error on my part but I don't see any evidence that it was and thought I should mention it here just in case. Error is gone again for now.
Comment #6
cburschkaIf you were able (and had) to reapply the patch, that means your code must somehow have been reverted to the unpatched version, since you can't apply the same patch twice.
Comment #7
sanjanaa CreditAttribution: sanjanaa commentedComment #8
TomChiverton CreditAttribution: TomChiverton commentedRather than just patching around the error, could some logging be added to try and indicate what (other module ?) has caused the problem ?
Comment #9
strellman CreditAttribution: strellman commentedWell it has been a month and 3.5 still has the big error msg. Do I try the dev version an older version or a different module?
Comment #10
SMonsen CreditAttribution: SMonsen commentedI'm a noob, so sorry for the dumb question, but can someone explain how to apply this patch? do I place the code somewhere or install the .patch file in the module directory...
Comment #11
carvalhar CreditAttribution: carvalhar commentedi had the same problem and this patch solved it, nice work :)
Comment #12
pimentoski CreditAttribution: pimentoski commentedfor all the people that can not execute the path just replace the "dhtml_menu.module" by the one in attachment. it's already patched.
Comment #13
pimentoski CreditAttribution: pimentoski commentedi forgot the file... sorry. it's here
Comment #14
Ole Martin CreditAttribution: Ole Martin commented@pimentoski ;
BIG BIG thanks, you save my day!!
Comment #15
lizuka CreditAttribution: lizuka commentedthanks for the patch, it seems to be working.
Just for information, the error appeared after I created a new entry on my primary-links menu that is using some superfish js and css...
the entry wasn't the first one, it was generated via a vocabulary item and using the taxonomy menu module.
maybe this can help you find out a bit more about this.
Comment #16
AlexisWilke CreditAttribution: AlexisWilke commentedHi guys,
I got this problem using http://drupal.org/project/bookmarks
They have a menu admin/build/bookmarks where you can setup different things for the bookmarks module.
Then they have many sub-menus such as admin/build/bookmarks/list which have a type other than the default (i.e. this one is a MENU_DEFAULT_LOCAL_TASK, some are MENU_CALLBACK).
This means you call the function _dhtml_menu_subtree() expecting to get some menu items, but since they all are hidden items, you are expected to return an empty array. This would work if your test at the end of that function was correct which it isn't. The attached patch is a fix for that purpose.
The patch offered in #2 is correct too, but really it is the called function that's "broken" and expected to always return some kind of an array, possibly empty.
If you have any question, feel free to ask.
Thank you.
Alexis Wilke
Comment #17
did1979 CreditAttribution: did1979 commentedHy,
the problem comes with the Book module. When I choose Menus without DHTML for my book, it works correctly.
I will try the patch.
ciao.
did
Comment #18
asb CreditAttribution: asb commentedPlease have a look at #467770: Book structure disappears repeatedly, if problems with the combination of the contributed 'DHTML Menu' module and the core 'Book' module appear.
Greetings, -asb
Comment #19
drupalusering CreditAttribution: drupalusering commentedPatch in #16 is perfect
Comment #20
epe CreditAttribution: epe commentedPatch works fine, hope the next version of module will solve problem, so we dont need to patch again.
Comment #21
silurius CreditAttribution: silurius commentedAny chance dhtml_menu-is-array-483920-2.patch in #3 can get rolled into a new release? I just installed dhtml_menu-6.x-3.x-dev and completely forgot about all this until I searched and discovered it again, which is obviously my own silly oversight, but still, it's been a while! :-)
Comment #22
geerlingguy CreditAttribution: geerlingguy commented+1 on committing the patch in #16!
I can confirm this fixed the problem for me (was getting LOADS of watchdog errors...).
Comment #23
AlexisWilke CreditAttribution: AlexisWilke commentedChanging status!
Comment #24
maxchock CreditAttribution: maxchock commentedthanks for the patch.
Comment #25
Cleo CreditAttribution: Cleo commentedThe patch in #2 solved my problem! U save my day! Thnx
Comment #26
enkara CreditAttribution: enkara commentedThanks for the patch!
Comment #27
guldi CreditAttribution: guldi commented#16 solves it. thx.
Comment #28
cburschkaThanks for this patch!
The
is_array
check still isn't enough, particularly as a replacement forisset
, becauseis_array()
will trigger a notice when called on a non-existent array index. So what is needed is an isset before the is_array:That's what I've committed now.
Comment #30
ekorich CreditAttribution: ekorich commentedthe patch works but it's add one extra menu when i used with sucker menu from zero point theme.
Comment #31
AlexisWilke CreditAttribution: AlexisWilke commentedekorich,
There is an option in the settings to turn off that extra menu entry. It's there because the top-menu becomes the menu opener. So if not there you actually cannot go to that page.
However, if you're using suckerfish, you may not need DHTML....
Thank you.
Alexis Wilke
Comment #32
ekorich CreditAttribution: ekorich commentedI just use dhtml menu cos i can't use sucker menu in my left sidebar so i still use dhtml menu. well i guest i should turn off it for primary menu cos it's already use sucker fish. Thanks Alexis
Comment #33
Ela CreditAttribution: Ela commentedsubscribing for any possible updates.. was having this error too.
Comment #34
1661Design CreditAttribution: 1661Design commentedsubscribing.
Comment #35
avior CreditAttribution: avior commented#2 patch works great. this solved my problem
thanks