Menu doesn't play well with taxonomy/term/%/all pages

twiinz - April 27, 2008 - 16:44
Project:Drupal
Version:7.x-dev
Component:taxonomy.module
Category:bug report
Priority:normal
Assigned:Unassigned
Status:patch (code needs work)
Description

Example of menu:

book ('link_path' => taxonomy/term/1/all)
-- art
-- politics

Problem: After clicking on the book link, the menu won't expand to show its children like it normally should.

Reason: A call to get_menu_item() on the page 'taxonomy/term/1/all' will return an item with a href field of 'taxonomy/term/1'. This href won't match the link_path for the book item in the menu, which in turn won't be marked as a member of the active trail, which leads to it's children not showing.

Fix: By having taxonomy/term/%/all in the menu router get_menu_item() will return the correct href

The problem also exits in D6, D5 has the intended behavior.

AttachmentSize
taxonomy.module.patch1.06 KB

#1

twiinz - April 30, 2008 - 05:12

My bad.

AttachmentSize
taxonomy.module.patch1.06 KB

#2

catch - September 21, 2008 - 22:27
Status:patch (code needs review)» patch (code needs work)

Seems reasonable to have an explicit callback for this path, however there's now loader functions for %taxonomy_terms, so could use a re-roll for that.

 
 

Drupal is a registered trademark of Dries Buytaert.