[wp-trac] [WordPress Trac] #11018: display_page_row loops forever

WordPress Trac wp-trac at lists.automattic.com
Thu Oct 29 22:21:55 UTC 2009

#11018: display_page_row loops forever
 Reporter:  hailin        |       Owner:  hailin     
     Type:  defect (bug)  |      Status:  new        
 Priority:  normal        |   Milestone:  2.9        
Component:  Template      |     Version:  2.7        
 Severity:  normal        |    Keywords:  needs-patch

Comment(by westi):

 Replying to [comment:6 hailin]:
 > I agree that we should try to prevent the loop from forming in the first
 > where is the code that handles page parent_id update?


 Probably need a function to validate the passed in post_parent (also check
 the supplied parent exists I guess)

 Replying to [comment:6 hailin]:
 > _get_post_ancestors() can not detect loops involving multiple hops.
 > It only makes sure post ID and parent_id are not the same. So we can not
 rely on it.
 > I think the loop breaking logic in the original patch is solid.

 Ok.  But the change should go into _get_post_ancestors as we have the same
 bug there and then we can call that and use count() to get the depth we
 are at.

Ticket URL: <http://core.trac.wordpress.org/ticket/11018#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list