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

WordPress Trac noreply at wordpress.org
Wed Jan 13 03:12:36 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:  has-patch has-unit-tests  |     Focuses:  template
--------------------------------------+---------------------------
Changes (by boonebgorges):

 * owner:   => boonebgorges
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"36275"]:
 {{{
 #!CommitTicketReference repository="" revision="36275"
 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.

 Props jmdodd.
 Fixes #35419.
 }}}

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


More information about the wp-trac mailing list