Opened 14 years ago
Closed 14 years ago
#11205 closed defect (bug) (fixed)
Behaviour when parent page is trashed is undefined
Reported by: | sirzooro | Owned by: | |
---|---|---|---|
Milestone: | 2.9 | Priority: | normal |
Severity: | normal | Version: | 2.9 |
Component: | Trash | Keywords: | needs-patch |
Focuses: | Cc: |
Description
Create two pages: Parent and Child. Set the former as a parent for the latter. Then trash Parent page. When you start editing the Child page, WP will display two notices:
Notice: Undefined offset: 1 in C:\wordpress29.local\wp-includes\post.php on line 2603
Notice: Trying to get property of non-object in C:\wordpress29.local\wp-includes\post.php on line 2603
It should be easy to remove these warnings. But there is another problem: when you save Child post, you will lost Parent-Child relation. Keep in mind that user may want to untrash the Parent page later.
Change History (5)
Note: See
TracTickets for help on using
tickets.
Odd - I don't get this error.
It is true, however, that editing the child of a trashed page loses the parent-child relation. I'm not sure what the alternative would be, however. Perhaps the parent could be shown in the list even if it is trashed, but that could be confusing. Maybe we need Jane's input here for the UI.