0

I have just migrated to a new host and upgraded my Wordpress to 4.9.8 (from 3.9.x, embarrassing I know, plan to keep it up to date from now on).

I also went through the process of replacing plugins that were not maintained and updating everything. Once I was done, I exported my PHP logs to make sure that everything was running smoothly and I found this error message being spammed (hundreds of lines per day):

[24-Nov-2018 06:25:10 UTC] WordPress database error Duplicate entry 'gaming-laptops' for key 'slug' for query INSERT INTO `wp_terms` (`name`, `slug`, `term_group`) VALUES ('Gaming Laptops', 'gaming-laptops', 0) made by do_action_ref_array, WP_Hook->do_action, WP_Hook->apply_filters, _wp_batch_split_terms, _split_shared_term

I have done some research about repairing the database, which I am happy to do but I am just a little nervous about causing further damage. If anyone has experience in this type of issue and could point me in the right direction, I would really appreciate it.

Thanks!

P.S: Most of the other stuff I found while trying to fix referred to having an issue with the primary key. I don't think this applies because unlike their error log, my one does not mention that.

UPDATE 1: Thanks to feedback, I found a tag that had the slug of "gaming-laptops", which is obviously causing the error. However, when I try to delete the tag (removed it off the single post that it was attached to first), I get this error message:

enter image description here

... and if I try to edit it (so that it has a different slug):

enter image description here

NOTE: I didn't mention it directly, but I have a category called "Gaming Laptops" (slug is gaming-laptops), that is why I think that this is an obvious conflict and the reason for the error messages.

0

Are you adding "gaming-laptops" as a tag on posts on a regular basis?

If not, then you might be hacked and have something trying to post spam onto your system, just doing it poorly and thus creating error messages.

  • Thank you for the suggestion, I actually never use tags but after reading your message, I went and checked if I had any tags and wow, yes I did. In addition, the tag was "Gaming Laptops" and had a slug of "gaming-laptops". However, it seems that I cannot delete the tag (says "you are not allowed to do that") and if I edit the tag (to change it to something else), I just get a "-1" error (red box). Added screenshots to my original post. – Sgtmullet Nov 25 '18 at 19:27

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.