[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:46:44 UTC 2016


#39078: Theme starter content pages 404 if multiple auto-drafts were saved
--------------------------+--------------------------
 Reporter:  dlh           |       Owner:  westonruter
     Type:  defect (bug)  |      Status:  accepted
 Priority:  high          |   Milestone:  4.7
Component:  Customize     |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+--------------------------
Changes (by westonruter):

 * owner:   => westonruter
 * priority:  normal => high
 * status:  new => accepted
 * milestone:  Awaiting Review => 4.7


Comment:

 @dlh another great catch. As we were talking at contributor day, our first
 thought was to make `get_page_by_path()` exclude auto-draft posts. But
 this could have the negative effect of making the posts/pages inaccessible
 in the preview. Also, there could be some plugins that are expecting
 `get_page_by_path()` to include auto-drafts, and so it is dangerous to
 change that at this point during RC2.

 So what we discussed together with @mboynes was to leave the `post_name`
 empty when importing starter content, but to then instead store the
 `post_name` in postmeta for that post. Then when the post is published, at
 that time we can supply that `post_name` at the time of publishing.

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


More information about the wp-trac mailing list