﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
20108	Comment counts not updated from edit-form-comment.php	dllh	westi	"Repro:

1. On a site with some comments, visit the comments listing page in the admin.
2. Observe the comment count on a post with several comments.
3. Click to edit one of the comments and approve it or mark as spam as part of the edit.
4. Observe the comment count for the post on the comments listing page again.

Expected Result: The comment count will increment or decrement.

Actual Result: The comment count doesn't change.

Further info: Because the ajax links on the listing page use a different method for updating the counts, these links work.

This is caused by the omission of an ""echo"" statement in edit-form-comment.php. This prevents the value that includes the comment_post_ID from being printed, which in turn causes the comment count to fail to update.

Specifically, in wp_update_comment_count() in wp-includes/comment.php, there's a check for deferred comment counting whose ""elseif"" checks for $post_id. If $post_id isn't found (it'll be """" thanks to this bug), then wp_update_comment_count_now() never fires.

Compare line 22 of edit-form-comments.php, which prints the comment_ID hidden field, to the line just below, which should print the comment_post_ID field. The first includes an echo that the second omits.

The attached patch adds the echo, which resolves the problem.

This dates back to [19612], in which some tidying up resulted in the dropped value. This so far appears in trunk only but might be nice to fix before the next release."	defect (bug)	closed	normal	3.4	Comments	3.4	normal	fixed	has-patch	dllh
