[wp-trac] [WordPress Trac] #55309: Incorrect post comment count after deleting comment with replies
WordPress Trac
noreply at wordpress.org
Thu Mar 3 16:29:07 UTC 2022
#55309: Incorrect post comment count after deleting comment with replies
--------------------------+-----------------------------
Reporter: jwz | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Comments | Version: 5.9.1
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
If you move a comment to the trash, and that comment has sub-comments,
none of those comments are visible (which is desired) but
post->comment_count is reduced by 1 rather than by the total number of
comments that have now been hidden.
For example: post has 1 comment with 3 replies. Comment count is 4. Delete
the first comment. Now no comments are visible but comment count is 3.
The first comment has comment_approved set to 'trash' but the other 3
comments are still '1'. Perhaps the right fix is that when trashing a
comment, all of its sub-comments are also trashed explicitly rather than
implicitly.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55309>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list