• Resolved scottorama

    (@scottorama)


    I just upgraded to WordPress 2.5. Everything went ok, but my comment counts displayed all say zero even for posts with comments on them. The comments are all still there and can be seen; It is only the comment count that’s displayed beneath the post that is wrong.

    If a new comment is left on post, the comment count is updated correctly. It just shows zero until that happens.

    In browsing my WP database, I noticed the wp_posts table has a comment_count field. Currently it has the value of 0 for all the posts (except those which have received comments after the WP 2.5 upgrade).

    I’m wondering if there are any MySQL gurus out there who would know if the comments count can be corrected through a SQL query of something.

    If so, what would the command be and how would I enter it? I access my WP database using phpMyAdmin 2.9.1.1. Forgive me for being such a newb here, but I don’t know much about SQL.

    Thanks in advance for your help. It’s really appreciated.

Viewing 13 replies - 16 through 28 (of 28 total)
  • Yes haochi, thank you also for your work !
    I speack on my site horoscope

    Thanks for the code. I am having some problem with my blog, you save my day!

    many thanks. its really worked even for kbe on WP 2.6.1

    I tried this earlier for 2.7, but it did not seem to work. I thought it did, but within the hour, the numbers were no longer correct.

    I just ran this again in 2.7 and it work. At least I think it worked. We’ll see what happens.

    Does anyone know the cause? My guess is the script goes into the database and reads the comment_count number and checks to ensure that it is correct, looking for trackbacks and comments directly related to that post number. Is that correct?

    Thanks.

    I got the same problem when I exported mySql from my old host to my new one. The thing I do is export it again, it work.

    Export it again? To me, that does not make sense since if I look at the raw data in the database, it provides the incorrect number.

    I guess I could try it, but still wondering if there is some sort of issue elsewhere.

    For others that are having this issue, I’ve got another thread going here – http://wordpress.org/support/topic/233605?replies=3#post-964180 – because this thread is marked as “Resolved” in the title.

    Can you chime in over there?

    Do you mean the exported one or the original in the old server. If you talked about the database that you’ve exported, you should try to export from you old server again. Because I found that some time the export file are incorrect/missing.

    Unfortunately, that is not an option for me since I’ve merged the posts from two blogs, and since the merge, I’ve had at least 50 new posts and maybe 100+ comments.

    Why would this problem effect new posts? I post something new, and immediately the first comment added bumps the number up to 4 or 5 shown.

    Articles of interest really good job.
    Best regards

    Me too, this is not an option for me, after the merger of my two blogs 300 posts and 500 new comments! My blog is Astrologie

    In browsing my WP database, I noticed the wp_posts table has a comment_count field. Currently it has the value of 0 for all the posts (except those which have received comments after the WP 2.5 upgrade). Thanks Mike pit bikes

    very nice article,keep the good work

Viewing 13 replies - 16 through 28 (of 28 total)
  • The topic ‘MySQL Table For Comment Count Incorrect Although Comments Are There’ is closed to new replies.