WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Says "no comments" when there are comments (20 posts)

  1. llworldtour
    Member
    Posted 4 years ago #

    Hi there-
    I posted awhile back on this and never got it resolved so i'm desperately trying again.

    I use WP 2.8.5 on Firefox with Connections Theme and am hosted at Bluehost.

    Awhile back, I imported my old blog over. The problem is ONLY with all the imported posts - any new posts since then are fine.

    Each imported post says ‘no comments’ even though that when you click on each post and scroll down you can see there ARE comments. So I guess it’s some disconnect w/ the ‘comments’ ‘no comments’ and ‘number of comments’ codes.

    Here’s an example of a ‘pre-import’ post with the problem:
    http://www.llworldtour.com/2007/11/01/locked-out/

    At the top it says NO comments and at the bottom it says NO RESPONSES, but then lists all the comments.

    I would SO appreciate any and all help.
    Thank you!
    Lisa

  2. Shane G
    Member
    Posted 4 years ago #

    Hi,

    Check with default theme it should be the theme level issue.

    Thanks,

    Shane G.

  3. llworldtour
    Member
    Posted 4 years ago #

    Hi-
    I had done this before and it was the same problem even in the default theme.

  4. bh_WP_fan
    Member
    Posted 4 years ago #

    Were your previous exported posts from the same version of WordPress as the blog you imported them into? Meaning that if you took an export from WordPress 2.6.5 and tried importing it into a WordPress 2.8.4 or something like that, it may have caused that. I would also suggest trying the default theme again even though you did say you've done it before. When you do that, also deactivate all of your plugins. (Rename your wp-content/plugins directory.) With the plugins deactivated, and while using the default theme, check to see if it still behaves the same.

  5. llworldtour
    Member
    Posted 4 years ago #

    Okay i will try that, thanks. BUT stupid question first:

    I have customized my theme a good bit and have modified the php files --like i have ads in the sidebar, etc. I have NEVER changed themes since i did all this customization. when i change themes...and then change back--does it affect the PHP files and all the changes i've made???
    I'm afraid to do this and lose my work.

    Thanks!!

  6. bh_WP_fan
    Member
    Posted 4 years ago #

    You shouldn't lose anything, but if you are worried, you can download a copy of the theme as it is before switching it.

  7. llworldtour
    Member
    Posted 4 years ago #

    On both my theme (connections) or the Default theme--it's still the same.
    on any posts that were imported to my new self-hosted blog came with their comments but their posts still say "No Comments" but when you click on that you can see the actual comments.
    Please help! How can i fix this? Some code somewhere?

    Thanks!

  8. bh_WP_fan
    Member
    Posted 4 years ago #

    Try this, in the following order:
    1) Deactivate all plugins (Renaming the plugins directory, is an easy way)
    2) Repair and optimize your database: http://helpdesk.bluehost.com/index.php/kb/article/000496
    --3a) Make a backup of your Database. You can use the Backups icon in your cPanel, then click the particular Database you want.
    3) Upgrade your WordPress to the latest version, or run the upgrade again via Tools > Upgrade > Reinstall Automatically.

    I suspect that will fix it. If it doesn't work... I'm not sure what to suggest next, other than making sure you have a good backup of your database, doing a brand new install, and importing your posts into the new install. Depending on the results you get by trying the above, I may come up with some more suggestions or, perhaps someone else has another suggestion--I'd love to see it as I'm curious now.

    [edit] Once thing I noticed is that, on all the WordPress blogs/sites that I have, the comments link is referenced by /#comments, but your URL point to /#respond. I'm not sure what's causing that, but it really sounds like something which was custom written, most likely by the theme, but possibly by a plugin. Since switching to the default theme didn't fix it, I'm wondering if a core file was edited, or something was added to the database. The above suggested re-upgrade may fix that, though.

  9. llworldtour
    Member
    Posted 4 years ago #

    Hi bh-
    Thanks so much for trying to help me. I followed your steps exactly...and am still having the same issue with "no comments" on any posts I created before the import to Blue Host. Quite the conundrum for me.

    Where can i take a look at some code maybe to do with what you said about #comments or #respond.

  10. bh_WP_fan
    Member
    Posted 4 years ago #

    Also try re-uploading all of the core files from your version of WordPress.

    Unfortunately I cannot really help much from here, but a quick search on the files from my site shows the following files contain the keyword "#comment"

    ./wp-admin/edit-form-advanced.php
    ./wp-admin/comment.php
    ./wp-admin/includes/template.php
    ./wp-includes/comment-template.php
    ./wp-includes/feed-atom.php
    ./wp-includes/pluggable.php
    ./wp-includes/link-template.php

    (Note this would likely be set somewhere else as a div, eg <div id="comment"> and I see the following two files with that entry: wp-admin/includes/dashboard.php, and wp-content/themes/mytheme/comments.php)

    The database also found two entries for it in the _options table.

    It seems it would be better to make a good copy of your wp-content directory and also of your database, then run a completely new installation. Test it, see if the comments work properly on a test post, then import your database and test again. Then put your theme back in from your wp-content and test again and lastly put in your plugins and test again, trying to see at which point things quit working properly.

  11. tutunai
    Member
    Posted 4 years ago #

    Hello,

    I am having the same exact problem: I imported my blog a couple of weeks ago in order to self-host it, and now all my old posts show "no comments yet" although when I go to their individual pages I can see the comments fine.

    I added a comment tonight to one of the posts and then it magically showed the number of comments for that post only. It still displays "no comments yet" for ALL the other posts.

    I tried deactivating plugins, switching back to default theme, optimizing and repairing my database, re-installing wordpress automatically, and still..nothing.

    I have over 6000 comments and I really don't want this important feature of my blog to just die like this. Does anyone know what I can do to fix this?

  12. tutunai
    Member
    Posted 4 years ago #

    Important update: I've just discovered that posts dating before July 2008 DO show the comment numbers on the homepage, but any posts after that date display "no comments yet." Any ideas? Help much appreciated! :)

  13. llworldtour
    Member
    Posted 4 years ago #

    Tutunai-
    It sounds like we are having the same problem...except ALL my posts PRE-import show "no comments (even when there are comments). All my posts that i posted after i imported to Blue Host and self-hosting...show the correct number of comments. Frustrating. Not sure what your July 08 date signifies.
    LL

  14. bh_WP_fan
    Member
    Posted 4 years ago #

    I checked into the structure a little and realized that #respond is always used where there are no comments and #comments is used where there are comments. Since there are comments, I would think that the problem is simply that the database doesn't know there are comments. The comment_count field in the posts table is where that data would be stored. If the database doesn't have that entry, upgrading, changing plugins, etc., just isn't going to fix it.

    In order to make that entry appear, the database will need to evaluate the number of comments again and hopefully get it right this time. llworldtour, try creating a comment of your own on the particular post "Locked Out" you pasted above and see if it then shows any comments for that post. Afterwards you can delete your self-made comment and see if it realizes at that point that other comments exist.

  15. llworldtour
    Member
    Posted 4 years ago #

    Hi bh-
    Thanks for the continued help. I really appreciate your time.

    So...you are right. I made a test comment on an old one that had comments but said "No comments" at the top...and after it published...it now says "6 comments."
    So....my questions is...
    is there a one-step way to remedy this now? Or do i have to make dummy comments for all of these (100s) to 'reconnect' each post to reality??
    Thanks!!
    Lisa

  16. bh_WP_fan
    Member
    Posted 4 years ago #

    Hmm, I may be able to come up with a query which could be ran to force the table to update, but I'm not sure how that would be. I may look into it a little later, but the only way I can think of right now would be to manually add comments then remove them.

  17. llworldtour
    Member
    Posted 4 years ago #

    Well, last night i stayed up until 2am...posting a comment to each 'no comment' post. So don't worry about that query. Thanks again for the help!

  18. bluehole
    Member
    Posted 4 years ago #

    I've duplicated the solution on a few posts and it works on mine too, but I don't have the patience to do it manually. Any chance someone can come up with a query to update?

    Thanks!

  19. nrepair
    Member
    Posted 4 years ago #

    There's a script on the link below that should solve the problem you guys are having - without having to manually add and delete comments to each post.

    http://www.ankurb.info/2008/11/16/reseting-post-and-comment-count-in-wordpress/

  20. jane566
    Member
    Posted 4 years ago #

    Meaning that if you took an export from WordPress 2.6.5 and tried importing it into a WordPress 2.8.4 or something like that, it may have caused that. I would also suggest trying the default theme again even though you did say you've done it before. When you do that, also deactivate all of your plugins.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags