WordPress.org

Make WordPress Core

Opened 5 years ago

Last modified 6 months ago

#11235 new defect (bug)

Pages whose ancestors are not all "published" cannot be used as parents for other pages.

Reported by: caesarsgrunt Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 2.9
Component: Posts, Post Types Keywords:
Focuses: Cc:

Description

Pages with trashed parents cannot be used as parents for other pages (they do not appear on the list).

Change History (5)

comment:1 caesarsgrunt5 years ago

  • Component changed from Trash to Taxonomy
  • Owner set to filosofo
  • Summary changed from Pages with trashed parents cannot be used as parents for other pages to Pages whose ancestors are not all "published" cannot be used as parents for other pages.

Correction : This does not only apply to trashed posts.

For example, changing a post's status to "pending", "draft", or "trash" will make all that post's descendants unavailable for use as parents for new posts. Also, although existing posts with them as parents will continue to work perfectly, the parent will be removed when these posts are next edited.

comment:2 scribu5 years ago

  • Keywords reporter-feedback added; needs-patch removed
  • Milestone changed from 2.9 to Future Release

It's not clear to me what the problem is.

Pages with non-published parents can't or shouldn't be allowed as parents?

comment:3 caesarsgrunt5 years ago

  • Keywords reporter-feedback removed

Create and publish two pages; Parent and Child. Set the parent of the latter to be the former. Now delete/un-publish Parent.

In the database, Child is still a child of Parent.
In the front end, on the live site, Child will now appear as a top-level page.

If you were to re-publish Parent, the taxonomy would be the same as before you un-published it.

Now there are two problems.

  1. Create a new page. Call it Grandchild. Now, although Child is still visible in the front-end and back-end, you cannot set it to be the parent of Grandchild.
  1. Edit Child. Save it. Now, the database will be changed so that Child is a root page. If you were now to re-publish Parent, Child would no longer be a child of it.

Let me know if you want any more details.

comment:4 scribu5 years ago

  • Component changed from Taxonomy to General
  • Owner filosofo deleted

Pretty clear now, thanks.

comment:5 nacin6 months ago

  • Component changed from General to Post Types
Note: See TracTickets for help on using tickets.