Closed (fixed)
Project:
Dynamic Persistent Menu
Version:
6.x-1.0-beta1
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
31 Dec 2008 at 00:16 UTC
Updated:
7 Feb 2009 at 01:00 UTC
warning: Invalid argument supplied for foreach() in /var/www/vhosts/tauheed-sunnat.com/httpdocs/sunnat/sites/all/modules/dynamic_persistent_menu/dynamic_persistent_menu.module on line 112.
line 112
is
foreach($menu['below'] as $menu_item) {
Comments
Comment #1
yrocq commentedFixed in beta 2
Comment #2
johnhanley commentedYann,
Thanks for the quick response and great module.
The latest fix now enables the top (parent) menu items to appear as expected, but clicking a child menu item produces the following error:
warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/www/html/bq/sites/all/modules/dynamic_persistent_menu/dynamic_persistent_menu.module on line 122.
The child menu items do not persist, which is probably related to the above error.
Comment #3
johnhanley commentedI should add that my particular menu has 3 levels of links.
Parent
- Child
- - Child
Does Dynamic Persistent Menu support multi-tiered menus? In theory it shouldn't matter if the navigation contains two levels or ten, right?
Comment #4
johnhanley commentedAny status on this bug? I know we're just coming off of a holiday week and that it's only been a few days since my last post, but one of my current projects depends on this module working properly. I'm willing to take a look at the issue myself, but I wanted to give the maintainer first crack at it since he's already familiar with the code.
Let me know!
Comment #5
johnhanley commentedI spent a couple of hours today debugging this issue, but wasn't able to determine anything conclusive.
Firstly, the $mlid passed to function theme_dynamic_persistent_menu() on line 76 appears to always equals 0 so the if/else condition on line 85 is never true.
Secondly, the menu_set_active_trail() function in the foreach on line 108 doesn't return anything so the $trial array never gets defined, which is causing the aforementioned error on line 122.
The net result is that the children menu items are never persistent.
I think this module has excellent potential, but in its present state the 6.x version is completely unusable and should only be considered developmental (not beta.)
Can someone take a look at this issue and offer his/her analysis?
Comment #6
yrocq commentedBacteria Man : I fixed the error message on line 122. It is in the development release (DRUPAL-6--1 branch). Could you test it on your Drupal ?
Comment #7
johnhanley commentedYann,
I just installed and tested the dev branch, but unfortunately the error still occurs.
Take a look at my notes above. The $trial array doesn't exist, which is why the error at line 122 is occurring.
If it'll help I will send you (via pm) the URL to my dev server.
Comment #8
yrocq commentedIt seems that the problem comme from #195876: [Drupal 6] Breadcrumbs not working? . I commit a workaround in development branch. You'll have to wait the next nightly build or make CVS checkout.
Comment #9
yrocq commentedhttp://drupal.org/node/195876
Comment #10
johnhanley commentedYann,
I just tried the latest build, but $trial is still undefined resulting in the same error at line 122. I didn't see any new code that addressed the problem.
I'm happy to help test or provide assistance. Let me know how you would like to proceed.
Thanks,
John
Comment #11
yrocq commentedI don't think you use the right version. Line 122 is a comment. From which URL did you get the file ?
Comment #12
johnhanley commentedYann,
My bad! Yes, the latest version fixed the issue--nicely done!
I'm wondering what it would take to add a third tier of items. For example:
parent
-child
--child
It would be ideal if the module dynamically supported an unlimited depth, but three is probably the most practical.
After examining the code it should be possible to simply check for children of children. Do you have any suggestions?
Comment #13
yrocq commentedThe bug seems fixed, so I close this issue.
Third item level is a new feature request. Could you post a new issue for it ?
Thanks !
Comment #14
johnhanley commentedYes, this issue can be considered fixed.
My client has changed their mind so the display of third level hierarchy is no longer a requirement.
Comment #15
johnhanley commentedWe just launched a site using Dynamic Persistent Menu: www.sbribioquest.org
The themer did a great job converting the system text to images.
Thanks again for the great module.