What are the steps required to reproduce the bug?
1) Create a few menu items in the primary links menu. One of the items is at the highest level (with no parent) and the other are children of the first:
a
--b
--c
2) Set the path of 'a' to be .
3) activate the primary links block (tested in garland with the links block on the right sidebar)
What behavior were you expecting?
On the front page I expect the menu item 'a' to be expanded, showing 'b' and 'c'.
What happened instead?
The menu does not expand.
I can't tell if this is a bug or feature and I can't see any other issue about this. Sorry if I've missed something obvious!
Comments
Comment #1
theborg commentedCan you say which is the path to a?
Comment #2
sym commentedAh, it got filtered out:
2) Set the path of 'a' to be .
should be
2) Set the path of 'a' to be <front>.
So 'a' links to the front page, but after its been clicked (and you are viewing the front page) you cannot see the expanded menu.
Setting back to active, because I've given the more info.
Comment #3
theborg commentedI am not able to reproduce it on FF 2.0, linux, neither rc2 or dev.
Comment #4
dvessel commentedsym, can you set the menu item to be expanded all the time (by checking off "expanded" for the parent item.)? I can't even get that to work even though I set "source for secondary links" to primary in "admin/build/menu/settings".
Comment #5
sym commentedIf I set the menu item 'a' to be expanded then it is expanded on all pages as expected.
I have tried changing the secondary links settings too, with no affect.
theborg: have you set up the menu as I did? Did your menu item expand on the home page?
Comment #6
webernet commentedConfirmed.
With the following menu structure, the top level link in the primary links menu block doesn't expand on the front page.
Comment #7
dvessel commentedOkay, confirmed as well.
Another related issue is that if the path set for the parent item is not understood by the menu system, it will never expand. I was trying with an external link.
Comment #8
theborg commentedConfirmed for me, I haven't set the correct test menu before.
What I have found is that the function that builds the menu_tree_page_data has this sql:
And in the case of front this is returning false because href is translated to 'node', so the parents array is empty.
Comment #9
theborg commentedThis patch checks if the current path is front page. Although the case of the external invalid path that dvessel found it has to be handled.
Comment #10
chx commentedThe external link needs no resolution, it's external so by definiton it can not match any Drupal path which are root relative.
Comment #11
theborg commentedThis works for me, just corrected a little typo on chx's patch.
Comment #12
webernet commentedTested OK.
Comment #13
sym commentedPatch applies and works
Comment #14
gábor hojtsyWell, using db_placeholders() here would probably be overkill (and get to the same effect), so this looks all right. Committed, thanks.
Comment #15
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #16
designbysoil commentedAny solution for Drupal 5.x