When the path for a menu item combines taxonomies (i.e. taxonomy/term/11+12), the menu item does not remain expanded. This occurs even with the "Expanded" option checked.

CommentFileSizeAuthor
#3 drupal.tax.combine.swf42.27 KBrobin monks

Comments

Steve Dondley’s picture

Just to make this more clear:

Parent menu item
--child: links to taxonomy/term/11+12
---grandchild: links to taxonomy/term/11
---grandchild: links to taxonomy/term/12

When the child menu item gets clicked, both the parent and child menus collapse.

Steve Dondley’s picture

Quick Hack

The following code was placed on line 370 of the includes/menu.inc file:

$path = str_replace(' ', '+', $path);

It took care of the problem. Of course, this solution may cause problems for menu links to files that have path names with spaces.

robin monks’s picture

StatusFileSize
new42.27 KB

This still occurs with the latest HEAD. I created a flash animation that shows a custom menu item "Testy" that links to "taxonomy/term/1+2" to show this effect.

Robin

Richard Archer’s picture

This is still causing problems: http://drupal.org/node/38923

Current the best solution is to manually urlencode the path when you create the menu:
?q=taxonomy/term/1%2b2

Should this happen automatically?

Perhaps menu.inc needs to run links through urlencode before passing them to l(). This happens in theme_menu_item_link().

Considerations:

  • Would this break other modules that rely on menu not fiddling with the paths?
  • What about people who have entered urlencoded paths to work around this problem? Would we need an update script to urldecode all stored paths?
magico’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)
Lieb_’s picture

Version: x.y.z » 6.3
Status: Closed (fixed) » Postponed (maintainer needs more info)

Hi,

Sorry to re-open this issue but this still remains an issue using the /all option for a taxonomy path.
The moment I manually encode to use taxonomy/term/1%2b2 it works, but using axonomy/term/all does not, then the menu item again collapses like the original bug report states.

jamesoakley’s picture

Just to second this. I'm trying to use menus where a parent menu points to a /all page. Selecting the parent item does not lead to the child tree being shown expanded. The Taxonomy Force All module isn't available for Drupal 6, so I'm encountering this issue for the first time.

jamesoakley’s picture

I haven't worked out how the issue Status codes work, so I'll leave this as active (needs more info), and let someone else work out if and how it should be closed.

The answer lies in the patch at http://drupal.org/node/251868#comment-826304.

crifi’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)

This is a duplicate of #251868: Menu doesn't play well with taxonomy/term/%/all pages all types of this issue are described there. If I'am wrong, please reopen this bug report.