[wp-trac] [WordPress Trac] #39078: Theme starter content pages 404 if multiple auto-drafts were saved

WordPress Trac noreply at wordpress.org
Sun Dec 4 21:31:15 UTC 2016


#39078: Theme starter content pages 404 if multiple auto-drafts were saved
--------------------------+-----------------------------
 Reporter:  dlh           |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Customize     |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Steps to replicate running Twenty Seventeen on a "fresh" install:

 - Open the Customizer
 - Do something that adds new `auto-draft`s of the starter content. For
 example, refresh the Customizer.
 - Publish the starter content.
 - Visit the frontend and attempt to navigate to one of the starter content
 page, like "Contact," and see the page 404.

 Publishing the starter content publishes the most-recently created `auto-
 draft`, but the earlier ones (with lower IDs) remain. `get_page_by_path()`
 doesn't account for post status, so when you visit the starter content
 page, the query returns the `auto-draft`.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39078>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list