Closed (fixed)
Project:
DHTML Menu
Version:
6.x-3.5
Component:
PHP Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
6 Jun 2009 at 18:34 UTC
Updated:
25 May 2011 at 03:23 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
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 commentedI can confirm that this patch corrects the problem. Thanks, Arancaytar.
Comment #4
Anonymous (not verified) commentedConfirmed that this patch removes the error.
Comment #5
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 commentedComment #8
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 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 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 commentedi had the same problem and this patch solved it, nice work :)
Comment #12
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 commentedi forgot the file... sorry. it's here
Comment #14
Ole Martin commented@pimentoski ;
BIG BIG thanks, you save my day!!
Comment #15
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 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 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 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 commentedPatch in #16 is perfect
Comment #20
epe commentedPatch works fine, hope the next version of module will solve problem, so we dont need to patch again.
Comment #21
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 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 commentedChanging status!
Comment #24
maxchock commentedthanks for the patch.
Comment #25
Cleo commentedThe patch in #2 solved my problem! U save my day! Thnx
Comment #26
enkara commentedThanks for the patch!
Comment #27
guldi commented#16 solves it. thx.
Comment #28
cburschkaThanks for this patch!
The
is_arraycheck 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 commentedthe patch works but it's add one extra menu when i used with sucker menu from zero point theme.
Comment #31
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 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 commentedsubscribing for any possible updates.. was having this error too.
Comment #34
1661Design commentedsubscribing.
Comment #35
avior commented#2 patch works great. this solved my problem
thanks