Opened 5 years ago
Closed 2 months ago
#46604 closed defect (bug) (fixed)
Twenty Seventeen: Front page panels allow pages of any status to be shown.
Reported by: | brettshumaker | Owned by: | karmatosed |
---|---|---|---|
Milestone: | 6.7 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Bundled Theme | Keywords: | has-patch needs-testing commit |
Focuses: | Cc: |
Description
I noticed that if you have a published page set to a Front Page Section X Content
and that page is then set to private
, draft
, pending
, or trash
at some point in the future, the content still appears on the homepage. And if the page is deleted permanently, an error is shown and the content of the "Homepage" is shown again.
When going back into the Customizer > Theme Options, pages that do not have the status publish
no longer show up in the select box. This makes it unclear to the user what has happened.
Choosing — Select —
and publishing the Customizer changes removes the page(s), but I think that's a suboptimal experience.
It's easy enough to check the post_status
of the page before displaying the panel, but some thought will need to go into how to handle that situation in the Customizer.
Attachments (6)
Change History (12)
@
5 years ago
This is the logged out, front end view after altering the post_status of the chosen pages.
#1
@
3 years ago
- Keywords has-patch needs-testing added
Hi and welcome to WordPress Core Trac!
I think there might be a use case for private page content within a private/membership site. If not, the conditional could check for publish
status only.
Verifying $post
first in the conditional seems to avoid getting errors on post_status
.
The first patch does not show placeholders again in Customizer if the previously selected page is switched to draft status or trashed, so I made another version for that.
#4
@
2 months ago
- Milestone changed from Future Release to 6.7
I am going to take a look at this, test and look into if this could be committed - thank you.
This shows the initial state of the customizer - all Front Panel pages are published.