[wp-trac] [WordPress Trac] #14591: Admin menu.php incorrectly sets page taxonomy query string

WordPress Trac wp-trac at lists.automattic.com
Wed Aug 11 18:25:54 UTC 2010


#14591: Admin menu.php incorrectly sets page taxonomy query string
----------------------------+-----------------------------------------------
 Reporter:  t31os_          |       Owner:                 
     Type:  defect (bug)    |      Status:  new            
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Administration  |     Version:                 
 Severity:  normal          |    Keywords:  has-patch      
----------------------------+-----------------------------------------------
 Hi,

 I've been working with the admin menu code over the last week (personal
 project, writing a menu), and i've come to spot a bug with taxonomy
 submenu items under the "Page" post type.

 In '''wp-admin/menu.php''', 3.0.1 and current trunk, each taxonomy under
 the page post type sets the menu item URL with post_type first, followed
 by taxonomy.

 Unfortunately this is contrary to how '''$submenu_file''' is set, which
 places the taxonomy onto the URL first, followed by the post type (which
 is how every other post type is treated, tax first, post type second).

 For any post type not a page, the typical URL is..
 {{{
 edit-tags.php?taxonomy=TAXNAME&post_type=POST_TYPE
 }}}
 For pages, this becomes.
 {{{
 edit-tags.php?post_type=POST_TYPE&taxonomy=TAXNAME
 }}}
 This causes the conditional checks performed in '''wp-admin/menu-
 header.php''' to fail for page taxonomies (discovered when performing my
 own similar checks), and submenu items are not correctly marked as active.

 Patch for trunk is attached.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14591>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list