• Hi All,

    I think there might be a bug affecting the comment_count field in WP 2.0?

    I recently uploaded my WP 2.0 blog to my remote host from my local machine to make it public. I had some test comments (for previewing my theme’s handling of comments) against the couple of existing posts.

    Once the site was loaded I used the admin pages to delete the test comments. I can confirm that the wp_comments table is empty, however the comment_count field in the wp_posts field wasn’t decremented by the appropriate number (which would have been back to 0 in the case of the two posts in question, since I deleted all of the comments associated with them) when these comments were deleted. One post shows a comment_count value of 4 (which was the number of test comments against that post before I deleted them) and the other has a value of 1 (again, the number before deletion).

    These values show up as the number of comments against those posts when you view the front page of my blog, but of course no comments are displayed (because they don’t exist) when you view either of the posts on their own.

    Is this a known issue? I couldn’t find any results on a search for comment_count. If it is a known issue, is there a known workaround? I can probably hack the code myself to make deleting comments update comment_count in wp_posts appropriately, but I’d rather go with a WP solution, rather than mine, if one exists.

    Many thanks,

    planetthoughtful

Viewing 2 replies - 1 through 2 (of 2 total)
  • Are you using Spam Karma?

    There was an issue with the comment count, upgrade to the latest version 2.1 if you are. ??

    Thread Starter planetthoughtful

    (@planetthoughtful)

    No, sorry, I did see that in other posts and I should have mentioned that I’m not using Spam Karma at all.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘comment_count ‘bug’ in WP 2.0?’ is closed to new replies.