[wp-trac] [WordPress Trac] #11235: Pages whose ancestors are not all "published" cannot be used as parents for other pages.

WordPress Trac noreply at wordpress.org
Sun Oct 2 14:19:05 UTC 2016


#11235: Pages whose ancestors are not all "published" cannot be used as parents for
other pages.
-------------------------------+-----------------------------
 Reporter:  caesarsgrunt       |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Future Release
Component:  Posts, Post Types  |     Version:  2.9
 Severity:  normal             |  Resolution:
 Keywords:  has-patch          |     Focuses:
-------------------------------+-----------------------------

Comment (by adamsilverstein):

 Hey @muxahuk1214 thanks for your patch!

 I did some basic testing on the patch and verified it fixed the primary
 issue reported on this ticket: "Pages with trashed parents cannot be used
 as parents for other pages" - after your patch I was able to select the
 child pages of trashed pages as my new page parent, and restoring the
 parent or publishing it restored the proper page hierarchy.

 I'm concerned, however, about side effects: once trashing a parent, if I
 edit the child page and ''set a new parent for it'', then later restore
 the original parent page, won't this override/replace my child's parent
 selection? This seems unexpected/buggy and should be avoided.

 A few questions/suggestions:

 * Why do you think we need to add the filters?
 * What about cleanup of the _wp_post_parent_fallback meta when post
 parents are deleted?
 * the child post query could be a little more efficient using fields to
 get and pass just IDs
 * the filters could use inline docs;

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


More information about the wp-trac mailing list