[resolved] Comment count. (20 posts)

  1. kimchihead
    Posted 9 years ago #

    I have just upgraded to WP 2.0. Very smoothly, I might add! :)

    The only problem I have now is that the comment count seems to be wrong on my latest post. It says I have eight comments, when in fact there are nine.

    I have not modified any of my template files after the upgrade.

    Thanks in advance!

  2. citeewurkor
    Posted 9 years ago #

    do you use Spam Karma? There's a plugin available for Spam Karma if you are using it.

  3. kimchihead
    Posted 9 years ago #

    Gee, thanks! That fixed my problem, alright! :)

  4. citeewurkor
    Posted 9 years ago #

    rah! My first support success!

  5. fozylet
    Posted 9 years ago #

    i had the same problem. though installing sk2.1 made sure the problem doesn't occur for new posts, it doesn't correct the problem for older posts for which the comment count is still messed up. any idea how to correct this?!

  6. Does http://lair.fierydragon.org/2005/11/sk2-wp2compatibility/ not do it?

    And I've been thinking of writing a small script to batch update the comment count on all posts. I think I'll do it for those like you and me that really wanna make sure the count is right.

  7. artwalk
    Posted 9 years ago #

    fozylet, i had the same problem too and was promptly solved by installing sk2.1. but for the older posts, you're right - they remain messed up. but i discovered that when you post a new comment on that post, the correct count will now be obtained.

    so since i only have one old post that has the counter problem, i just added a dummy new comment to update the counter and then just deleted it afterwards.

  8. dsotweek
    Posted 9 years ago #

    If you go in and "recover" all the posts, it corrects the counts.

  9. Ryck
    Posted 9 years ago #

    Well, a workarround for this bug (caused probably for a bad update, at least in my case) is this:

    1. Change the value of the db_version field in the wp_options table to 3307, like this:

    UPDATE wp_options SET option_value = '3307' WHERE option_id =81 AND blog_id =0 AND CONVERT( option_name USING utf8 ) = 'db_version' LIMIT 1 ;

    Then re-run the upgrade.php file and the comment count field of all posts will be recalculated.

    Good luck!

  10. khalido
    Posted 9 years ago #

    Tried that. but it didn't work!

  11. despacho
    Posted 9 years ago #

    how about this - did you comment on your post? if you commented by your admin nickname, the comment doesnt count.

  12. planetthoughtful
    Posted 9 years ago #

    I have a similar problem to this, but I'm not running Spam Karma at all, and in fact the only plugins I have activated are Markdown, which was included with WP 2.0, and 2 plugins I wrote myself, neither of which do anything with comments.

    Basically, while developing my theme, I entered several test comments to work out how they would appear. When I was ready to publish my site, I deleted the comments, since they were all of the 'Test comment 1' etc type. However, the comment counts on my posts still show that comments exist, when I have effectively removed them all.

    Any thoughts?

    Much warmth,


  13. ktula
    Posted 9 years ago #

    Since upgrading to WP 2.0 (now on 2.0.2), some of my posts have indicated that they have 1 comment but in fact there was not any. Not sure what is updating the database. I have to update MySQL DB and remove the incorrect comment count, like this:

    mysql> update wp_posts set comment_count=0 where ID=215;

    where ID is the post ID.

  14. superkev
    Posted 9 years ago #

    I have also noticed this problem, and I do not have Spam Karma installed. I think the problem started occuring after upgrading to 2.0.2. I do have the SecureImage plugin installed. Not sure if that could be affecting it though...

  15. bckpkrs
    Posted 9 years ago #

    I have this same problem, and no Spam Karma either.

    My webhost upgraded WP to WP2.02 on Friday. Several posts made after that do not show the correct comment count; it still says "Be the first to comment"

    Any other ideas why I would be getting an acurate comment count in my via my "clean archive" plugin is correct, but on the main page of my blog?


    the Comments count doesn't seem to work.

    Here's the odd point; I'd had SK 2.0 on the server, but not active. I've since (due to an error) pulled the entire Sk2 plugin folder off the server, but the "SpamKarma-reloaded plugin still shows up in my plugin admin panel (deactivated).

    Am I missing something obvious here?

    Thanks in advance for any further tips or ideas.

  16. sodafizz
    Posted 9 years ago #

    It’s definitely a Spam Karma problem, as the problem goes away (on all new posts anyway), when I deactivate Spam Karma.

    I’ve tried all the suggestions above, but am still having the comments count problem. Here’s what I’ve tried:

    1) I removed my existing Spam Karma plug-in.

    2) http://unknowngenius.com/blog/wordpress/spam-karma/ - From this site (SK’s author), I’ve installed Spam Karma version 2.2 (I downloaded and installed this on 4/12/06).

    3) http://www.alexallied.com/web-20/wordpress-2-comments-count-fixed - I followed these instructions (Go to Manage > Spam Karma 2 > and go to Approved Comments. In Approved Comments, there will be a list of recent approved comments. Check all of them and click “Run Selected Entries” through “All Plugins”.)

    The problem persists…

    4) When I try to enter a test comment myself, my comment is rejected (“Sorry, but your comment has been flagged by the spam filter running on this blog: this might be an error, in which case all apologies. Your comment will be presented to the blog admin who will be able to restore it immediately. You may want to contact the blog admin via e-mail to notify him.”). When I then go to Manage > Awaiting Moderation, there is nothing there…

    5) If you go into Manage – Spam Karma – General Settings, at the bottom you’ll see “Advance Options”, which notes “SK2 will not work properly if your theme is not 100% 1.5-compatible. In particular, oftentimes, the comment form of some custom themes does not contain the proper code to work with 1.5 plugins. For more details and a guide on how to fix, please check out the wiki.You do not have to worry about this if you are using a standard out-of-the-box 1.5 install and the theme that came with it.” (The WIKI link is http://wp-plugins.net/wiki/index.php?title=SK2_Theme_Compatibility)

    There’s a “Theme Compatibility Check” icon just below too as well as an “Advanced Compatibility Check” box.

    Using both of these, my theme registers as compatible (okay).

    6) If I go into an individual comment someone has posted and do nothing except click “edit comment” and process such an ‘edit’, the comment count on that one post displays correctly…

    7) I was going to try the (unnecessary) step of uploading SK 2.0 (not 2.2) and using the separate plug-in mentioned on http://lair.fierydragon.org/2005/11/sk2-wp2compatibility/. However, the link for this plug-in fix is no longer available (presumably due to the release of 2.2).

    8) http://wordpress.org/support/topic/54870 - I followed Kafkaesqui’s suggestion re. the new disk cache functionality in WP 2.0. “You can disable caching (temporarily or permanently) by adding this line to your wp-config.php

    define('DISABLE_CACHE', true);

    The problem persisted...

    9) When I try to input a test comment (by first logging out of WP) like any other site visitor would (name, email required, etc.), I get the same message rejection as #4 above…

    Any ideas?…

    In the meantime:

    10) I’ve since deactivated Spam Karma, which allows the comment counter to work properly (on all new comments). I’ve downloaded Akismet which is working fine and allowing proper comment counts. (You have to go to wordpress.COM, not .org, and set up an acct in order to receive your necessary API Key for Akismet to work.)

  17. bmck
    Posted 9 years ago #

    I have the same problem as Ktula, using WordPress 2.0.2 + K2 and not Spam Karma (but using Askimet + Did You Pass Math, and various other non comment-related plugin-ins).

    Typically the comment count shows "1" on posts that have none (e.g. here). However, sometimes the comment count on an existing post is falsely increased by 1 e.g. 6 to 7. The problem occurs when askimet is enabled and when it is disabled.

    I solve it temporarily by adding a comment myself then deleting it, which restores the correct value. I'd rather not be doing this repeatidly, but have no idea what to try next. Suggestions would be most appreciated.

  18. bmck
    Posted 9 years ago #

    By-the-way, when a "phantom" comment is added to the count, I receive no notification that there is a new comment. The comment count is false as listed in single pages, archive pages, index page, and Dashboard > Manage > Comments.

    Does anyone think this could be related to spam attacks? I'm pretty sure they are not genuine but failed attempts to leave comments.

  19. bmck
    Posted 8 years ago #

    Resolved? Err.. why is this topic "resolved"? I still have "phantom" comments.

  20. bmck
    Posted 8 years ago #

    OK, it may be resolved. Apparently the DYPM plugin had an issue, now fixed:

    "There was a bug with comment counting, rejected posts still incremented the comment count (if you didn't have moderation on)"

    From: http://www.herod.net/dypm/dypm.html#whats_new

Topic Closed

This topic has been closed to new replies.

About this Topic