[wp-trac] [WordPress Trac] #35419: Incorrect comment pagination when comment threading is turned off

WordPress Trac noreply at wordpress.org
Wed Jan 20 08:32:02 UTC 2016


#35419: Incorrect comment pagination when comment threading is turned off
--------------------------+---------------------------
 Reporter:  jmdodd        |       Owner:  boonebgorges
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  4.4.2
Component:  Comments      |     Version:  4.4
 Severity:  normal        |  Resolution:  fixed
 Keywords:  fixed-major   |     Focuses:  template
--------------------------+---------------------------
Changes (by dd32):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 In [changeset:"36362"]:
 {{{
 #!CommitTicketReference repository="" revision="36362"
 Comments: Ignore hierarchy in pagination calculation when comment
 threading is disabled.

 In order to calculate comment pagination when newest comments are
 displayed
 first, `comments_template()` must perform a separate query to determine
 the
 total number of paginating comments available on a post. See [34729],
 #8071,
 pagination calculation - can be defined as a top-level comment, or a
 comment
 with `parent=0`. However, when comment threading is disabled, yet comments
 exist in the database that have parents, all comments - even those with a
 parent - are "paginating". (This typically happens when comments threading
 was
 once enabled, but has since been turned off.) As such, the total-
 paginating-
 comments query should only be limited to top-level comments when
 'thread_comments' is disabled.

 Merges [36275] to the 4.4 branch.
 Props jmdodd.
 Fixes #35419.
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35419#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list