[wp-trac] [WordPress Trac] #41727: Draft page loses its hierarchy on save when other pages are drafts in hierarchy

WordPress Trac noreply at wordpress.org
Fri Aug 25 14:28:15 UTC 2017


#41727: Draft page loses its hierarchy on save when other pages are drafts in
hierarchy
-------------------------------+------------------------------
 Reporter:  stode              |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Posts, Post Types  |     Version:  4.8.1
 Severity:  normal             |  Resolution:
 Keywords:                     |     Focuses:  administration
-------------------------------+------------------------------

Comment (by subrataemfluence):

 To my understanding this is logical enough. Say we have 4 pages, Page 1
 (no parent), Page 2 (Parent: Page 1), Page 3 (Parent: Page 2) and Page 4
 (Parent: Page 3). As long as they are all "Published" you can use them as
 parents of another page.

 Now, if we update status of Page 2 to Draft, if immediately gets publicly
 inaccessible and thus cannot be used as a Parent of Page 3. In this
 scenario, you lose the ability to use Page 3 as a parent of Page 4.

 Meaning if you go bottom up, the immediate parent of a page has to be the
 children of its immediate parent and that has to be Published. So, if the
 top most Page in the hierarchy is a Draft, all pages in the tree will lose
 their parent-child relationship.

 In short, if you make the page at top most level Draft, all pages in its
 tree will lose the hierarchy, but if you make a page Draft inside the tree
 (not the top most one), you would still be able to use the hierarchy for
 pages under it, but the page you just made Draft, won't come up in the
 dropdown.

 Let me try to create an example:

 1. '''Page 2 is made Draft''' - No page under it (3 and 4) won't be able
 to use it as their parent any more

 2. '''Page 3 is made Draft:''' Page 2 will never suffer as Page 1 still
 its parent, but when Editing Page 4, you won't be able to see Page 3 in
 the dropdown, rather you would see Main page, Page 1 and Page 2. Also, in
 this situation there will no default selection in the dropdown as you have
 made its immediate parent Draft. If you do not select a Parent at this
 stage, the page would be saved as a top level page (with no parent).

 I am not sure whether my explanation and examples could clear up the
 logical part of it by 100%, but I hope it will let you understand about
 the Parent-Child relationship and how they (should) work.

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


More information about the wp-trac mailing list