Opened 7 years ago
Last modified 4 years ago
#41727 new defect (bug)
Draft page loses its hierarchy on save when other pages are drafts in hierarchy
Reported by: | stode | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 4.8.1 |
Component: | Posts, Post Types | Keywords: | |
Focuses: | administration | Cc: |
Description
How to reproduce:
- Create a set of pages with a status publish
- Set hierarchy to pages
- Change the status to of the aforementioned set to draft
- Open draft for editing.
- Save as draft.
- Now you have lost the hierarchy.
I think you should retain the hierarchy, because it is quite common use case to build something as drafts before publishing them or taking pages to drafts if they are in need for editing and the user wants them out before edits are done. Tickets possibly related #15541 and #12890.
Change History (5)
#3
in reply to:
↑ 1
;
follow-up:
↓ 4
@
7 years ago
I understand that basic logic very well. I still think if I go an edit the drafts that before editing have the hierarchy intact, should not lose it if the status of the post is not changing.
There could be some kind of warning of losing the hierarchy.
#4
in reply to:
↑ 3
@
7 years ago
I agree with the warning part.
Replying to stode:
I understand that basic logic very well. I still think if I go an edit the drafts that before editing have the hierarchy intact, should not lose it if the status of the post is not changing.
There could be some kind of warning of losing the hierarchy.
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:
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.