Make WordPress Core

Opened 7 weeks ago

Closed 3 weeks ago

#64012 closed defect (bug) (duplicate)

Avoid counting post editor admin inline comments alongside user comments

Reported by: jeffpaul's profile JeffPaul Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Comments Keywords: has-patch
Focuses: Cc:

Description

The new Inline Comments feature currently causes admin/editor inline comments to be included in the overall user comment count on the All Posts screen. This inflates the visible count and mixes editorial feedback with actual user-submitted comments, which can confuse site admins and editors.

This was first identified in Gutenberg (issue#71621) and a PR was opened in wordpress-develop to address it (PR#9869).

As @adamsilverstein noted, this should be properly tracked in Core (and thus a Trac ticket here).

Steps to Reproduce:

  1. Enable Inline Comments.
  2. Add one or more inline comments in the block editor.
  3. Visit WP Admin → Posts → All Posts.
  4. Observe that the comment count for the post includes both user-submitted comments and editor/admin inline comments.

Expected Behavior:

  • The comment count on the All Posts screen should reflect user comments only.
  • Inline editorial/admin comments should not be included in this count.

Actual Behavior:
Inline editorial/admin comments are included in the count, leading to inflated and misleading numbers.

Proposed Fix:
Adjust the query/count logic to exclude inline editorial/admin comments from the standard comment count displayed in the admin UI.

Change History (2)

This ticket was mentioned in PR #9998 on WordPress/wordpress-develop by @ristojovanovic.


7 weeks ago
#1

  • Keywords has-patch added

This PR modifies the get_pending_comments_num() function to exclude editorial comments from the pending count and makes the function more extensible.

Changes Made:

Fixed the query by excluding block_comment type.

Added extensibility: Introduced the pre_get_pending_comments_num filter hook. This allows developers to modify the query arguments used for counting, making it future-proof for custom comment types or additional filtering needs.

Trac ticket: https://core.trac.wordpress.org/ticket/64012

#2 @wildworks
3 weeks ago

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

Duplicate of #64096.

Note: See TracTickets for help on using tickets.