[wp-trac] [WordPress Trac] #8592: Private Pages not listed in the Parent dropdown

WordPress Trac noreply at wordpress.org
Thu Feb 6 15:57:13 UTC 2014


#8592: Private Pages not listed in the Parent dropdown
-------------------------------+-----------------------------
 Reporter:  mtdewvirus         |       Owner:  nacin
     Type:  enhancement        |      Status:  reopened
 Priority:  normal             |   Milestone:  Future Release
Component:  Posts, Post Types  |     Version:  2.7
 Severity:  major              |  Resolution:
 Keywords:  2nd-opinion        |     Focuses:  administration
-------------------------------+-----------------------------

Comment (by plocha):

 I know this bug. In current WP versions you can't set a page to a child of
 a non published page directly. That's okay because we still don't
 supporting it. But we forgot to check for parentships if we set a page to
 non published. At fist view it looks like the parentship is removed if you
 reproduce this bug. But it isn't. Look at the 'All Pages' screen: there is
 still a hierarchy. But it's an invalid hierarchy.

 My patch contains code which '''really''' removes parentships in such
 cases. We could extract that code and use it until this ticket is fixed.

 I found found another problem: what if you're currently in wp_insert_post
 while another request is also in the same function? Example: you try to
 create a published child page of a published parent page. You pass the
 status inheritance code and the status of your child is still 'published'
 because the parent is also published. Suddenly a lightning-fast second
 user sets the parent to private before you inserted your child into the
 database. Result: we've got a private parent with a published child. Omfg!

 How handle WP such synchronization problems?

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


More information about the wp-trac mailing list