[wp-trac] [WordPress Trac] #18762: Pagination does not work correctly on walker in reverse order.

WordPress Trac wp-trac at lists.automattic.com
Fri Sep 23 21:08:43 UTC 2011


#18762: Pagination does not work correctly on walker in reverse order.
--------------------------+-----------------------------
 Reporter:  gburtini      |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Comments      |    Version:
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 Steps to reproduce:
 1. Go to Discussion and change Comments should be displayed with the
 comments at the top of each page to "newer" (that is, set
 comment_order='desc').
 2. Make sure your theme is paginating comments. Make sure you have more
 than the page limit of comments.
 3. Note that the first page does not actually contain the newest comments
 (they're off by a page, or perhaps they're just sorted in one way for the
 pagination and a different way for the inner page sort).

 If you check out the $start, $oldstart and $end variables, the way it was
 written before the patch, $start gets set to 11 (page limit + 1) on page =
 1, the way it is written after the patch, start is 0, as it should be.

 All I've done is swapped the order of $start and $end being updated. This
 fixes the starting point. This needs to be tested in more detail before
 actually deploying it, but there is definitely a pretty serious bug here.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18762>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list