#39368 closed defect (bug) (fixed)
.page-template-default body class in editor doesn't appear in initial post/page load.
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.7.1 | Priority: | normal |
Severity: | normal | Version: | 4.7 |
Component: | Editor | Keywords: | has-patch |
Focuses: | Cc: |
Description
The class .page-template-default isn't in tinymce editor body classes on initial load if default template is used. It was causing some odd behaviors when I was testing some themes out. This was because the themes were adding specific styles for .page-template-default. This class seems to only get added when you select a template from Page Attributes > Default, and there were some major visual differences from initial page load to what would be seen when selecting that template from page attributes. I think for consistency it should be present if that's the template in use.
- Add a page template to the theme. Mine was page-home.php
- Add a new page. This should use the default template.
- Inspect the body classes of the editor, there's no class added to designate this is the page-template-default at this point.
- Under Page Attributes, select Home. Inspect the body classes, you'll see page-template-page-home is applied.
- Select the Default template, you'll see page-template-default is applied and page-template-page-home is removed.
- Select the home page template again.
- Publish the page. Inspect the body class you'll see it's still there. Refresh the page. It's still there.
- Select the default template, then update the page and refresh. You'll see that the class is no longer present.
Attachments (1)
Change History (7)
#1
@
7 years ago
- Keywords needs-patch added
- Milestone changed from Awaiting Review to Future Release
#2
@
7 years ago
- Keywords has-patch added; needs-patch removed
- Milestone changed from Future Release to 4.7.1
39368.patch should fix this. Moving to 4.7 for consideration.
Version 0, edited 7 years ago
by
(next)
This ticket was mentioned in Slack in #core by jeffpaul. View the logs.
7 years ago
Note: See
TracTickets for help on using
tickets.
Confirmed, tested with Twenty Twelve. The additional classes were introduced in #37599.