Comments that have been queued for administrative approval are never reflected in the count of comments.

Presumably _comment_update_node_statistics() needs to be called from comment_admin_edit() or comment_save() or some such place. Perhaps also the cache-clearing should be performed then, rather than when the comment is queued.

Comments

bertboerland’s picture

Priority: Critical » Normal

apart from your point (i think comments that need to be approved should not be added to the comment count?), this doesnt make it to the critical status.

kps’s picture

i think comments that need to be approved should not be added to the comment count?

Well, of course not. They should be added to the comment count when they're published. (And subtracted when unpublished, obviously.) Otherwise the comment count bears no relation to the number of comments.

this doesnt make it to the critical status.

Well, nonsense comment counts make Drupal 4.5.0 unusable for a production site. If that isn't critical, what is? This doesn't say.

paul-at-murphymaphia.com’s picture

I couldn't agree more.
When a comment is published, the count should increase.
When unpublished, the count should decrease.
What can be done to fix this? Is there a patch in the works?

kps’s picture

I believe it's fixed in 4.6.

For 4.5, you can get my patch here -- look for "comment-save-count.patch" near the bottom of the list.

killes@www.drop.org’s picture

Status: Active » Closed (fixed)

not interested in fixing this for 4.5.