Opened 19 years ago
Closed 19 years ago
#5457 closed defect (bug) (fixed)
deleting a nested page from Manage => Pages causes query inconsistency
| Reported by: | hailin | Owned by: | hailin |
|---|---|---|---|
| Priority: | high | Milestone: | 2.5 |
| Component: | General | Version: | 2.5 |
| Severity: | major | Keywords: | |
| Cc: | Focuses: |
Description (last modified by )
Given the following pages:
ID Title post_parent 4 sunpage 0 5 -moonpage 4 6 --starpage 5 7 rainpage 0
if we remove moonpage, and do page refresh, starpage is not displayed.
The root cause is that, after removing moonpage, the internal db state and cache may be out of sync. ie, querying phpmyadmin reveals the starpage has post_parent=4; yet
print_r(pages) within page_rows() reveals starpage has post_parent=5.
This can cause all sorts of perplexing problems if not fixed.
Attachments (2)
Change History (9)
#4
@
19 years ago
- Owner changed from to
- Status new → assigned
Fixed and tested on both wporg and wpcom.
The problem can actually be quite purplexing to users, as sometimes child page is displayed correctly; Yet after refreshing the page, it is displayed incorrectly. Then refresh again, it is correct/incorrect again....
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
In wp_delete_post() where we update children of the deleted page to point to the parent, we need to get the IDs of all affected pages and do a clean_page_cache() for each.