Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#36991 closed defect (bug) (fixed)

Page numbers are inconsistent when manually deleting comments

Reported by: samuelsidler's profile samuelsidler Owned by: rachelbaker's profile rachelbaker
Milestone: 4.6 Priority: low
Severity: minor Version:
Component: Comments Keywords: has-patch
Focuses: administration Cc:



  1. Have a lot of pages of comments/pings.
  2. Filter on only one of them (like pings) and more than one page of them.
  3. Go to the last page of pings and delete all pings on the page manually (not bulk delete).
  4. The number of pages changes, as expected, but changes from e.g. 6/6 to the total number of pages across both comment types (e.g. 6/41).

Per @rachelbaker, introduced in [17354].

Attachments (1)

type_list_pagination.patch (1.1 KB) - added by rachelbaker 8 years ago.
Don't use wp_count_comments if filtering by comment_type

Download all attachments as: .zip

Change History (6)

This ticket was mentioned in Slack in #core-comments by sam. View the logs.

8 years ago

8 years ago

Don't use wp_count_comments if filtering by comment_type

#2 @rachelbaker
8 years ago

  • Focuses administration added
  • Keywords has-patch added

#3 @rachelbaker
8 years ago

This occurs when filtering the Comments list table by a particular comment_type, because wp_count_comments() doesn't account for different comment_types. In type_list_pagination.patch, if the comment_type query var is set, I fallback to the $total - 1 value.

#4 @rachelbaker
8 years ago

  • Milestone changed from Future Release to 4.6
  • Owner set to rachelbaker
  • Status changed from new to accepted

#5 @rachelbaker
8 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 37664:

Comments: Fix pagination totals in the response of the inline delete actions when filtering the List Table by comment_type.

Within the Ajax action _wp_ajax_delete_comment_response() if the comment_type query var is set, fallback to the previous $total - 1 value instead of getting an incorrect value from wp_comment_count().

Fixes #36991.

Note: See TracTickets for help on using tickets.