#38696 closed defect (bug) (fixed)
Empty Post Attributes meta box showing for all post types when using a child theme
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.7 | Priority: | normal |
Severity: | normal | Version: | 4.7 |
Component: | Posts, Post Types | Keywords: | has-patch has-unit-tests commit |
Focuses: | administration | Cc: |
Description
This only happens when testing 4.7 beta.
When I have a vanilla child theme installed (no additional code aside from style.css), I'm seeing an empty Post Attributes box on the edit screen for all post types.
When I switch to a parent theme, the issue goes away.
The issue appears with twenty* child themes as well. All plugins have been deactivated.
Attachments (3)
Change History (13)
#1
@
9 years ago
- Component changed from General to Posts, Post Types
- Focuses administration added
- Keywords needs-patch added
- Milestone changed from Awaiting Review to 4.7
#3
@
9 years ago
Thanks! I did some testing and it looks like adding the $post
variable to the get_page_templates( $post, $post_type );
call in edit-form-advanced.php fixes the issue.
#4
@
9 years ago
- Keywords has-patch has-unit-tests added; needs-patch removed
@justinbusa Good catch. This line revealed that \WP_Theme::get_page_templates()
isn't passing the $post_type
when checking for templates of the parent theme, causing a false positive.
38696.diff adds a test for checking templates of a child theme.
Related: [38951]