Opened 13 years ago
Closed 13 years ago
#19077 closed defect (bug) (fixed)
Custom Post Type Sub-Menu Items Broken
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.3 | Priority: | normal |
Severity: | major | Version: | 3.3 |
Component: | UI | Keywords: | has-patch |
Focuses: | Cc: |
Description
If you add a sub-menu item to a custom post type the menu and page title break when attempting to view that sub-page. I mean, the menu item is not properly highlighted when you're on the sub-page and the page title is also not correct. For example, my site is called "My Test Site". This is what I see for the page title:
‹ Easy Admin Color Schemes — WordPress
In other words, there is no title for the actual page before the ‹ part.
Really, it's easier to just see it. I have attached a very simplified test case. I can see the problems with the latest trunk version of WordPress.
Attachments (3)
Change History (11)
#3
follow-up:
↓ 4
@
13 years ago
- Keywords has-patch added
Since [19052], WP_Screen::set_current_screen()
overwrites $typenow
with $current_screen->post_type
, even if it's empty. Before that, it used to be vice versa:
$current_screen->post_type
was set from $typenow
.
19077.patch is an attempt to restore previous behaviour.
#4
in reply to:
↑ 3
@
13 years ago
Replying to SergeyBiryukov:
$current_screen->post_type
was set from$typenow
Correction: only in some cases (e.g. 'edit' == $current_screen->id
).
But still, $typenow
wasn't overwritten with an empty value in other cases (e.g. 'mycustomposttype_page_customposttypesubpage' == $current_screen->id
).
#6
@
13 years ago
19077.2.patch just prevents overwriting globals, leaving $current_screen->post_type
as is (which is probably closer to the previous behaviour).
Whoops! Just noticed the original ticket has a slight error. Not sure how to edit it. Where it has:
It should actually be:
Mixed a couple things I'm working on up. :P Sorry about that...