Opened 13 years ago
Closed 13 years ago
#14591 closed defect (bug) (fixed)
Admin menu.php incorrectly sets page taxonomy query string
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 3.1 | Priority: | normal |
Severity: | minor | Version: | |
Component: | Administration | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
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.
Attachments (1)
Change History (6)
#1
@
13 years ago
- Keywords commit added
- Milestone changed from Awaiting Review to 3.1
- Severity changed from normal to minor
Looks good.
#2
@
13 years ago
Thanks. :)
For clarity, to replicate said bug, register a taxonomy for the page post type and click the taxonomy link, the correct page is shown(edit-tags.php), but the menu item is not highlighted (due to the reasons stated in opening).
Fix page query arg order for page taxonomies in menu.php, fixes non-active page taxonomy submenu items.