Custom menu items with query string parameters fail to expand
Anonymous (not verified) - October 14, 2004 - 04:38
| Project: | Drupal |
| Version: | 5.7 |
| Component: | menu system |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | by design |
Jump to:
Description
It seems that using menus, when you have an item with subitems under it, the menu fails to expand on click when the associated link (for the parent item) contains ? arguments. An example of what I mean:
I have a link in a menu that goes to flexinode/termstable/4/1, and that works fine (it expands on click to show what's under it.)
When I change it to link to flexinode/termstable/4/1?sort=asc&order=Date or even just flexinode/termstable/4/1?sort=asc, it goes there correctly on click but does not expand!
If these URLs look weird, it's because I'm using flexinode_terms_extension, which was posted here: http://drupal.org/node/11212 .

#1
The $_GET['q'] variable is used to test for the user's current location. This does not reflect additional query string parameters such as the sort=asc in your example. I agree that it would be nice to allow for query string parameters in custom menu items, but I don't see an immediate way to do this.
#2
#3
substr($_SERVER['PATH_INFO'],1)
Won't this do the trick?
#4
Still here on latest HEAD.
Comment from chx:
I'd investigate request_uri() instead of $_GET['q'] ...Robin
#5
This still applies... I tested again cvs HEAD.
#6
Still seeing this issue in Drupal 4.7.2, and this is pretty bad if you cannot use clean url.
I have to disable clean URLs for a site and since now all URLs have a query string (i.e. /?q=...) submenus are totally broken. The active class is set for the selected menu item, but it is not expanded.
#7
Menu item paths are not the same as URLs. Query string parameters are not supported.
#8
Why not? What if I am linking to a prefiltered search page? I don't want to create a bunch of nodes and logic for no reason.