• Hey dear wordpress-community,

    I’ve recently got an issue with my blog: the comments-counter went crazy. I should have some pending comments but there weren’t any and posts should have a way to big amount of comments.

    Today, a look in the database revealed the issue: a whole bunch of comments were double in the database (with the same comment_id), in regarding to this phpmyadmin complained there isn’t a unique index, as well as the last couple of comments multiple times (up to 5) and with comment_id=0. Accordingly, these second kind of comments didn’t get displayed in all in front or the back end.

    I tried to add new comments as admin user and anonymous but all got the id 0.

    I cleaned the db (ID) per hand, fortunately there wasn’t to much comments.
    I deleted all duplicates and gave the ID=0 ones a running number. Accordingly, I could see them in wordpress now.

    Do you have any solution, I would be so happy ??
    Thanks in advanced
    Erik

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi,

    This can be due to any plugin conflict, try disabling the plugins one by one and commenting to check which one created the issue. If plugins are fine then try switching to the default theme and then check.

    Thanks

    It’s also possible that your user table might have broke. It’s supposed to start with one and increment everytime a new user is added.

    New users may be getting set or changed somehow to ID 0 after they comment which keeps the user from showing up and keeping their comments out of the list of comments but possibly incrementing the counter.

    I’d try adding a user and looking for that user. If they are not visible after being added you have a problem. Look at any plugins that work with the user table.

    If you are comfortable looking around at the database with PHPMyAdmin then you can probably see the user table problems and a lot more comments that you can see from USER ID 0.

    Thread Starter Erik

    (@erik15)

    Hey, thanks for the quick help.

    If plugins are fine then try switching to the default theme and then check.

    It’s not the theme (Publication, tried with default Twenty Seventeen).

    This can be due to any plugin conflict, try disabling the plugins one by one and commenting to check which one created the issue.

    I’m still on it but it’s no plugin only running on this subsite. I’ve forgot to mention, it’s a site in a network and it’s working fine on the other sites.

    It’s also possible that your user table might have broke. It’s supposed to start with one and increment everytime a new user is added.

    If you are comfortable looking around at the database with PHPMyAdmin then you can probably see the user table problems and a lot more comments that you can see from USER ID 0.

    The both user there are fine (ID 1 and 2) but I didn’t added some for ages.
    But it’s not the user ID making problems, it’s the “comment_id”.

    I’d try adding a user and looking for that user. If they are not visible after being added you have a problem. Look at any plugins that work with the user table.

    Thread Starter Erik

    (@erik15)

    adding new users works totally fine, the issue only affecting the comment table of the subsite.

    Do you know, where does wordpress takes the running integer for comment_id from?
    The source code (comment.php, comment-template.php) didn’t make so much sense for me…

    Thread Starter Erik

    (@erik15)

    Actually, there is a error message while submitting the contact. As signed in user I get this one:

    FEHLER: Der Kommentar konnte nicht gespeichert werden. Bitte versuche es sp?ter nochmal.
    ? Zurück

    ERROR: The comment couln't get saved. Pease try it again later.

    The error message for anonymous user seems to be more significant:

    Du schreibst die Kommentare zu schnell. Bitte etwas langsamer.

    You are writing the comments to fast. Please slower.
    That sounds like a anti spam plugin but I don’t really have a plugin doing that.

    Wordpress Version: 4.9.8
    Plugin-List:

    • Contact Form 7
    • Email protector
    • Enable Media Replace
    • Gutenberg
    • Imsanity
    • Responsive Lightbox & Gallery
    • CF7 Invisible reCAPTCHA
    • Widget Visibility Without Jetpack
    • WP-Piwik
    • Yoast SEO

    ERROR: The comment couln't get saved. Pease try it again later.

    Please check in browser console if there is any ajax error and also try deactivating every plugin that is on network and then try back after clearing browser cache.

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘comments added in DB with ID 0’ is closed to new replies.