WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#37966 closed defect (bug) (duplicate)

Comment children missing on paged comment views

Reported by: dd32 Owned by:
Milestone: Priority: normal
Severity: major Version: 4.6
Component: Comments Keywords: needs-patch
Focuses: Cc:
PR Number:

Description

Comment children comments do not appear to be being displayed when comments are paged.

The scenario is hard to explain without a visual, but here's some simple reproduction steps:

  • Create a post with 2 top-level comments
  • Create two replies for the comments. You now have a post with 4 comments.
  • Set comment threading to Break comments into pages with 1 top level comments per page and the last page displayed by default
  • View the comment pages for the post, Only the top-level comments are visible on all but the first page.
  • Add extra comments, top-level comments remain visible and cause pagination, child comments continue to not display on all but the first page.

This is not specific to 1 comments per page, it occurs with larger data sets as well.

Attached is an attempt at a unit test which shows something that succeeds under 4.5, but fails under 4.6 - I'm not sure if that's testing the actual code thats failing, but it's where I've gotten to after digging through comments_template() and WP_Comment_Query.

Attachments (1)

37966.unit-test.diff (2.4 KB) - added by dd32 3 years ago.

Download all attachments as: .zip

Change History (7)

@dd32
3 years ago

#1 @netweb
3 years ago

Confirmed /trunk r38300 (22nd August) works as expected, updating to /r38535 breaks per the ticket description

#2 @netweb
3 years ago

Reverting r38446 resolves the issue

This ticket was mentioned in Slack in #core by jeremyfelt. View the logs.


3 years ago

#4 @jeremyfelt
3 years ago

In 38537:

Comments: Revert [38497]

Restore direct SQL query when fetching descendants.

See #37696, #37966.

#5 @swissspidy
3 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #37696.

This ticket was mentioned in Slack in #forums by zoonini. View the logs.


3 years ago

Note: See TracTickets for help on using tickets.