Make WordPress Core

Opened 19 years ago

Closed 19 years ago

Last modified 19 years ago

#5498 closed defect (bug) (fixed)

Manage => Pages may produce orphaned page

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

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 19 years ago.
patch
5498_fix_bad_pages.diff​ (747 bytes ) - added by hailin 19 years ago.
fix bad pages whose parent = itself
5498_pages_2.diff​ (1.8 KB ) - added by hailin 19 years ago.
make the behavior completely the same as the original walk class

Download all attachments as: .zip

Change History (11)

#1 @hailin
19 years ago

  • Owner changed from anonymous to hailin
  • Status new → 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.

#2 @lloydbudd
19 years ago

  • Keywords has-patch added
  • Milestone 2.5 → 2.4
  • Version → 2.4

#3 @ryan
19 years ago

  • Resolution → fixed
  • Status assigned → closed

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

#4 @hailin
19 years ago

  • Resolution fixed
  • Status closed → reopened

#5 @hailin
19 years ago

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

@hailin
19 years ago

fix bad pages whose parent = itself

#6 @hailin
19 years ago

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

@hailin
19 years ago

make the behavior completely the same as the original walk class

#7 @ryan
19 years ago

  • Resolution → fixed
  • Status reopened → closed

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

#8 @ryan
19 years ago

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

Note: See TracTickets for help on using tickets.