• Jenny

    (@miss-newyork)


    I am working on a new theme right now and noticed a rather strange thing: I have a “false” comment showing up on every post and page and I haven’t been able to find anything on this, neither here nor on Google…

    It’s a “false” comment, because it doesn’t actually exist in the system and there are no IDs for those comments. Out of pure desperation I converted the page.php and comments.php templates back to the Classic theme, but that didn’t help. However when I actually add a comment it doesn’t change. My comment doesn’t show, but the anonymous, blank one is still there. If there are no comments, it says there are no comments, if there are (1 or more) it says there is one comment.

    I wouldn’t even know which code to post as an example, so I made a screenshot of what it looks like on every post & page:
    https://a.imageshack.us/img801/4479/wperrorsample.png
    Since comments are turned off for this page all that stuff shouldn’t even be there.

    Did I mess up the Loop somehow? I’m drawing a total blank here o.0

    Any help is really appreciated. Thanks!!!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    Gotta be something in your comment.php file.

    Post it up here and then give us a link to it so we can see it:
    https://wordpress.pastebin.com

    Thread Starter Jenny

    (@miss-newyork)

    That’s what I thought too, that’s why I changed everything back to zero. It’s 100% the original template file from the Classic Theme. I didn’t touch a single thing. (Although I tried it with Kubrick as well without any changes.)

    Anyway, here you go: https://wordpress.pastebin.com/KAPwx7mt

    Thread Starter Jenny

    (@miss-newyork)

    okay, I tried something else right now: I just copied the complete code from comments.php into single.php instead of the piece of code, which calls the comment template:

    the anonymous comment is gone and when there are really no comments the display seems correct. When there ARE comments I get this:
    https://a.imageshack.us/img714/2088/wperrorsample2.png

    3 is the correct number of comments in this case.

    Thread Starter Jenny

    (@miss-newyork)

    I still can’t say what it is, but I can say this:

    I switched the theme to Twenty-Ten and the problem was still there. I activated my theme on a fresh install of 3.0.1 and everything works fine. So this is definitely not theme related. Could anything have happened during the upgrade maybe?

    The count on the amount of comments might be messed up. Try opening the post for editing them hit save. Then try visiting the comments section in admin and clicking around.

    This usually fixes things for me and resets post counts and auto tag plugins. So maybe it will work for comments too.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    I just copied the complete code from comments.php into single.php instead of the piece of code, which calls the comment template:

    You can’t do that. The act of calling the comment template causes the comments to be loaded from the database. It’s more than a simple include.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘"False" comment on every post’ is closed to new replies.