3

So, I have a weird problem, and I'm not sure this is the right place to ask it, but I'm going to try because all other options have failed.

I have a site that is running WPML and WooCommerce. On this site, I have a page called Guestbook, which is just like any other page, but it accepts comments. Anyways, I recently decided to do some clean-up of all the "awaiting comments". They're all spam so I hadn't bothered until now. But going into the comments section of Admin, there is nothing there!

So my question is first of all, how do I rectify this? And could it have something to do with my code in the theme? I can't think of anything personally, but perhaps someone has stumbled upon this before and might have some insight?

Swedish WordPress Admin, displaying all languages.

"Kommentarer" is "Comments" in Swedish, just FYI.

  • That's old, yet we have the same issue. Have you figured it out? Disabling WPML doesn't seem to be sufficient... – Vincent Poirier Sep 22 '17 at 19:15
  • I'm having the exact same issue in WordPress 5.4.2. It's very strange and is probably database related. We did just move to a new hosting provider. – John Swaringen Jul 24 at 22:42
  • Unfortunately, I never did figure this out. I no longer manage the site so I don't know if the issue still remains either. – Athoxx Jul 25 at 0:02
  • Can you get to your database to run some queries if I give them to you? When I've had these kinds of problems before looking at some summary information on the table has helped. – mozboz Jul 25 at 13:12
  • @mozboz Like I said, I no longer have access to the DB with the issues. I have a feeling it's related to WPML however. – Athoxx Jul 25 at 22:12
2
+50

Try to check on DB level.

This SQL should give a list of all spam comments (which I assume skräpposter means):

SELECT * FROM `wp_comments` WHERE `comment_approved` = 'spam';

If the SQL gives 0 lines, the issue is with WordPress counting those comments, but in fact there are none. If the SQL gives a list, the issue is with the listing of those comments.

It may be an issue with the term spam being translated when writing comments to the db, but not when reading or vice-versa. You can check all approval status tags in your db using this:

SELECT DISTINCT `comment_approved` FROM `wp_comments`;

(or in some dialect: SELECT UNIQUE `comment_approved` FROM `wp_comments`;)

This should show terms like 1 (approved), 0 (pending), spam, trash etc. If you see translated string here, like skräpposter and similar, you may be in for a ride to find out why those terms are not written in the db as they should.

If all seems fine on the db level, it's trickier to find the reason, why those are not listed. Definitely needs the target system to be investigated more.

But anyway, this is where I'd start my investigation.

*: assuming your db prefix is wp_

Also:

It may be a malware infection, which may benefit from removing your ability to manage comments. They could as well hide spam comments from logged in admin user on the frontend, while showing them to regular visitors, so check your site in incognito and probably run some kind of a malware scan on it too!

| improve this answer | |
  • I'm unable to test this as I no longer manage the site I had the issue on, I'm also unable to set the checkmark as a solution. Perhaps @Vincent Poirier can test it as he has the issue currently. – Athoxx Jul 30 at 18:09
  • I've only gave my 2¢ because of the bounty from @john-swaringen Expiring in 2hrs anyway. Nevermind. It may help someone someday... – sbnc.eu Jul 31 at 20:04
1

This might be a conflict/issue with your theme. What theme are you using? Have you checked any comment or translation related settings in your themes settings (if any)?

You can also try this method for troubleshooting WPML.

  1. Go to the WPML > Support > Troubleshooting page.
  2. Find 'Clean up' section and click on the following buttons:
  • Clear the cache in WPML
  • Remove ghost entries from the translation tables
  • Fix element_type collation
  • Set language information
| improve this answer | |
  • I'm using WP Astra. I use it on a lot of sites and I've never encountered this problem before. – John Swaringen Jul 28 at 19:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.