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 .

Comments

JonBob’s picture

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.

JonBob’s picture

Title: Some Menus Fail to Expand » Custom menu items with query string parameters fail to expand
Anonymous’s picture

substr($_SERVER['PATH_INFO'],1)

Won't this do the trick?

Robin Monks’s picture

Still here on latest HEAD.

Comment from chx:
I'd investigate request_uri() instead of $_GET['q'] ...

Robin

dopry’s picture

This still applies... I tested again cvs HEAD.

mariuss’s picture

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.

Steven’s picture

Status: Active » Closed (works as designed)

Menu item paths are not the same as URLs. Query string parameters are not supported.

kevinquillen’s picture

Version: x.y.z » 5.7

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.