Menu item does not expand on selection (navigation.module)
jm1@drupal.tred... - May 9, 2004 - 19:05
| Project: | Navigation |
| Version: | HEAD |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Jeremy@kerneltrap.org |
| Status: | closed |
Jump to:
Description
I have created a menu item with a few children, all set to disabled by default. Now, the menu item does not expand to show the children when clicked. If I set any item to be enabled by default the menu item is always expanded. Sure this is not as intended, but am I missing something obvious...?

#1
I am unable to duplicate. I'm not sure what you're doing differently.
Can you give some examples? What is tha name and link of the parent item? What is the name and links of its children?
Also, did you enable 'Menu item permissions'? If so, this could be a permissions issue.
Finally, are you using with Drupal 4.4.x?
#2
Parent is named "Smagninger", link "node/view/11", URL alias "smagning"
Child #1 is named "Nyt: Smagekalender", link "node/view/22", URL alias "kalender"
Child #2 is named "Næste smagning", link "node/view/10", URL alias "smagning/next"
Child #3 is named "Sidste smagning", link "node/view/13", URL alias "smagning/last"
FYI some of the above terms are in Danish. :-J
URL aliasing is loaded.
Menu permissions are enabled.
Drupal version is 4.4.0.
TIA
#3
If you disable menu permissions, do the menus then work as expected?
#4
Nope...
I disabled menu permissions (menu ITEM permissions still enabled though):
If I enable "Active by default" for parent it invariably unfolds, regardless of setting for children.
If I disable "Active by default" for parent it WILL NOT unfold, regardless of setting for children, and regardless of how many times one clicks the darn thing. :-J
#5
Sorry, I meant menu item permissions. Does it work if you disable menu item permissions?
#6
I think I've tried just about any combination if menu (item) permissions, result is always:
If parent and/or any children are enabled menu is invariably unfolded, if all are disabled nothing ever unfolds...
#7
Are all your menu items "Active by default"? This would cause what you're seeing. If so, disable this settng on all menu items.
If not, I'm not sure where things are going wrong. Can you reconfigure / create a menu as described below, and see if it has the problem? I'd like to disable all the extra functionality and start simple, and first verify that that works for you...
1) Configure navigation module as follows (adminster >> configuration >> modules >> navigation)
Disable Menu permissions, Menu item permissions, and Menu taxomnomy.
2) Create a sample menu (administer >> configuration >> menu >> create new menu)
Just specify a name, 'test'.
3) Add a new menu item to menu 'test'.
Menu item name: a
Menu item URL: a
Parent: <root>
Weight: 0
Active by default: disabled
4) Create a second new menu item:
Menu item name: a1
Menu item URL: a/1
Parent: a
Weight: 0
Active by default: disabled
5) Enable the auto generated test block:
At "Administer >> configuration >> blocks" check Enabe for block 'test'.
6) Test the new block. Does clicking 'a' make the sub item 'a1' appear?
#8
Your example works fine. It even works after I enable menu and menu item permissions. But as soon as I change the URL of item "a" to something meaningful, like "node/view/##", the behaviour reoccurs. Oddly enough, if I change the URL from "a" to "admin", it DOES work...
#9
Okay, I think I've duplicated your problem. It looks like you configured the menu first, then you went and added url aliasing with the path module?
If the destination URL has an alias, you need to enter the alias in the URL field.
For example:
If you created an alias for 'node/view/1' to be 'faq', then when creating a menu item you need to specify 'faq' as the URL, not 'node/view/1'. If you do not use the alias when setting the URL for the menu item, the menu item will not match properly and so it will not expand.
#10
Correctamundo!
Thanks for your time - and patience. :-J
#11
I'll update the documentation.
#12
YES! #9 is the solution to my problem! I'm using version 4.5 because it's in Debian stable. But for me i was using the alias and menu items did not appear. When i used the node/# format, they started appearing.
#13
Hello,
Any ideas on 5.X installation.
The problem is same, the menus either remain always expanded or do not expand at all.
There is no active by default available as such.
Thanks
#14
On 5.x I found I had to add the page and in the menu settings select the correct title etc but NOT change the path and let it default to whatever node it gave the page. It then collapses and expands correctly and then I could go in and edit the path on each page and it still worked. A pain, but it worked for me.
#15
Update: It worked for a while, then I updated a page and none of my new menu items with children will expand on click. They are all in the navigation menu and the Administration menu still works great. What the heck is going on here??? I just want my menu to work!
#16
Drupal expand / collapse only one menu.
If you create 2 menu with the same(equal) elements and path, the work expand / collapse will be only one menu.
This needs to patch.
#17
I agree this is a BUG. And it's a usability issue for website developers. By all indications my meaningful url's were not expanding my "non-expanded" menu's when the top level url's were clicked. Defeating the whole purpose of "expanded" and "collapsed" menus.
Now it's completely BROKEN!
#18
WOW for such a critical component of Drupal I guess NOBODY gives a flying you know what about this not working.
I have seen posts about this that go back a ways too, so I know it's been a "BUG" for a long time. Whether or not it's fixed in drupal 6 I have no clue, but for some reason I doubt it.
#19
The navigation module was written for Drupal 4.4. If you are having issues with a current version of the Drupal menu system, you are posting your issues in the wrong place. Please open a new issue against Drupal core.
The navigation module is not maintained any more.
#20
Way to step up and show pride in your work. I've been fighting with this for an hour now. I understand what I need to do but still can't guess at the exact syntax to make a menu expand and collapse properly. I teach ecommerce classes and rave about drupal as a easy to use CMS but this is a pretty major flaw that begs the question of scalability and support.
#21
I am marking this as a duplicate because this request was marked incorrectly as "navigation" and should have been marked as "Drupal" and "Menu System". Please reference the following URL for the new support request:
http://drupal.org/node/251655
#22
Marking this as closed. Jeremy has clarified a few things about this original issue. Please consider this a dead module and any issue related to the menu system bug that has been chatted about in this thread should be continued at http://drupal.org/node/251655.