Make WordPress Core

Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#5498 closed defect (bug) (fixed)

Manage => Pages may produce orphaned page

Reported by: hailin's profile hailin Owned by: hailin's profile hailin
Milestone: 2.5 Priority: normal
Severity: normal Version: 2.5
Component: General Keywords: has-patch
Focuses: Cc:

Description

because array_splice may not preserve the original numeric index, it causes our pages display to produce orphaned pages.

Attachments (3)

5498_pages.diff (510 bytes) - added by hailin 18 years ago.
patch
5498_fix_bad_pages.diff (747 bytes) - added by hailin 18 years ago.
fix bad pages whose parent = itself
5498_pages_2.diff (1.8 KB) - added by hailin 18 years ago.
make the behavior completely the same as the original walk class

Download all attachments as: .zip

Change History (11)

#1 @hailin
18 years ago

  • Owner changed from anonymous to hailin
  • Status changed from new to assigned

In most cases, array_splice preserves index, yet, by spec, it may not.
When it doesn't, that is causing problems.
To fix this, we set $i to -1, thus when ++ed, it starts from 0.

@hailin
18 years ago

patch

#2 @lloydbudd
18 years ago

  • Keywords has-patch added
  • Milestone changed from 2.5 to 2.4
  • Version set to 2.4

#3 @ryan
18 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [6427]) Orphaned page fix from hailin. fixes #5498

#4 @hailin
18 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

#5 @hailin
18 years ago

patch walk class to make similar index change.
It is in 5498_pages_2.diff

@hailin
18 years ago

fix bad pages whose parent = itself

#6 @hailin
18 years ago

I've put all three fix together. All three should go into wporg as each fixes one different issue.

@hailin
18 years ago

make the behavior completely the same as the original walk class

#7 @ryan
18 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [6456]) Page walker fixes from hailin. fixes #5498

#8 @ryan
18 years ago

Some extra stuff got in there. Reverted with [6457].

Note: See TracTickets for help on using tickets.