Ticket #5457 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

deleting a nested page from Manage => Pages causes query inconsistency

Reported by: hailin Assigned to: hailin
Priority: high Milestone: 2.5
Component: General Version: 2.5
Severity: major Keywords:
Cc:

Description (Last modified by westi)

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

5457_clean_cache.diff (1.1 kB) - added by hailin on 12/14/07 19:45:24.
patch
5457_clean_cache_2.diff (0.7 kB) - added by hailin on 12/18/07 19:02:29.
additional patch to clean the cache of the orphaned pages

Change History

12/11/07 16:21:15 changed by westi

  • description changed.

12/11/07 16:23:31 changed by lloydbudd

  • version set to 2.4.
  • milestone changed from 2.5 to 2.4.

12/11/07 17:39:25 changed by ryan

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.

12/14/07 19:45:24 changed by hailin

  • attachment 5457_clean_cache.diff added.

patch

12/14/07 19:47:58 changed by hailin

  • owner changed from anonymous to hailin.
  • status changed from new to 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....

12/14/07 20:56:56 changed by ryan

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [6382]) clean page cache when reparenting pages after deletion. Props hailin. fixes #5457

12/18/07 19:01:57 changed by hailin

  • status changed from closed to reopened.
  • resolution deleted.

12/18/07 19:02:29 changed by hailin

  • attachment 5457_clean_cache_2.diff added.

additional patch to clean the cache of the orphaned pages

12/18/07 19:38:17 changed by ryan

  • status changed from reopened to closed.
  • resolution set to fixed.

(In [6403]) Clean cache for orphaned pages. Props hailin. fixes #5457