• Hi,
    i don’t know if anyone can help me with this issue.
    Looking in logs i’v noticed this error every time i’m tryng to edit or publish a post:

    wordpress database error:?[Duplicate entry 'facebook' for key 'slug']?INSERT INTOwp_terms(name,slug,term_group`) VALUES (‘Facebook’, ‘facebook’, 0)
    wordpress database error:?[Duplicate entry ‘google’ for key ‘slug’]?INSERT INTO wp_terms (name, slug, term_group) VALUES (‘Google’, ‘google’, 0)
    wordpress database error:?[Duplicate entry ‘tripadvisor’ for key ‘slug’]?INSERT INTO wp_terms (name, slug, term_group) VALUES (‘TripAdvisor’, ‘tripadvisor’, 0)
    wordpress database error:?[Duplicate entry ‘amazon’ for key ‘slug’]?INSERT INTO wp_terms (name, slug, term_group) VALUES (‘Amazon’, ‘amazon’, 0)
    wordpress database error:?[Duplicate entry ‘ebay’ for key ‘slug’]?INSERT INTO wp_terms (name, slug, term_group) VALUES (‘Ebay’, ‘ebay’, 0)`

    I’m using wp 5.7.2 and php 7.2 and last version of Schema & Structured Data for WP & AMP.
    Disabling Schema & Structured Data all works fine. Any idea?

    Tnx

    I’m working with other websites but without problems.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Magazine3

    (@magazine3)

    Can you please share the URL of your website?

    Thread Starter fabioambrosi

    (@fabioambrosi)

    Sure:
    https://www.giornalettismo.com

    Removing tags (facebook, google etc…) maybe solve the problem but we would like to avoid

    This is the error:

    2021-06-03 11:10:23 Error 2.16.181.222 AH01071: Got error 'PHP message: WordPress errore sul database Duplicate entry 'facebook' for key 'slug' per la query INSERT INTOwp_terms(name,slug,term_group) VALUES ('Facebook', 'facebook', 0) fatta da do_action('admin_init'), WP_Hook->do_action, WP_Hook->apply_filters, saswp_insert_platform_terms, wp_insert_term\nPHP message: WordPress errore sul database Duplicate entry 'google' for key 'slug' per la query INSERT INTOwp_terms(name,slug,term_group) VALUES ('Google', 'google', 0) fatta da do_action('admin_init'), WP_Hook->do_action, WP_Hook->apply_filters, saswp_insert_platform_terms, wp_insert_term\nPHP message: WordPress errore sul database Duplicate entry 'tripadvisor' for key 'slug' per la query INSERT INTOwp_terms(name,slug,term_group) VALUES ('TripAdvisor', 'tripadvisor', 0) fatta da do_action('admin_init'), WP_Hook->do_action, WP_Hook->apply_filters, saswp_insert_platform_terms, wp_insert_term\nPHP message: WordPress errore sul database Duplicate entry 'yelp' for key 'slug' per la query INSERT INTOwp_terms(name,slug,term_group) VALUES ('Yelp', 'yelp', 0) fatta da do_action('admin_init'), WP_Hook->do_action, WP_Hook->apply_filters, saswp_insert_platform_terms, wp_insert_term\nPHP message: WordPress errore sul database Duplicate entry 'airbnb' for key 'slug' per la query INSERT INTOwp_terms(name,slug,term_group) VALUES ('Airbnb', 'airbnb', 0) fatta da do_action('admin_init'), WP_Hook->do_action, WP_Hook->apply_filters, saswp_insert_platform_terms, wp_insert_term\nPHP message: WordPress errore sul database Duplicate entry 'amazon' for key 'slug' per la query INSERT INTOwp_terms(name,slug,term_group) VALUES ('Amazon', 'amazon', 0) fatta da do_action('admin_init'), WP_Hook->do_action, WP_Hook->apply_filters, saswp_insert_platform_terms, wp_insert_term\nPHP message: WordPress errore sul database Duplicate entry 'ebay' for key 'slug' per la query INSERT INTOwp_terms(name,slug,term_group) VALUES ('Ebay', 'ebay', 0) fatta da do_action('admin_init'), WP_Hook->do_action, WP_Hook->apply_filters, saswp_insert_platform_terms, wp_insert_term\nPHP message: WordPress errore sul database Duplicate entry 'walmart' for key 'slug' per la query INSERT INTOwp_terms(name,slug,term_group) VALUES ('Walmart', 'walmart', 0) fatta da do_action('admin_init'), WP_Hook->do_action, WP_Hook->apply_filters, saswp_insert_platform_terms, wp_insert_term\n', referer: https://www.giornalettismo.com/wp-admin/

    • This reply was modified 3 years, 5 months ago by fabioambrosi.
    Plugin Author Magazine3

    (@magazine3)

    Sorry for the delay in response. We tried our best to re-create it from our end but we are not able to do it also, no other users are facing this common. Can you please try to delete the data completely and start again from scratch and then do a fresh installation from the beginning? Hope it will fix the issue.

    Here is the complete documentation for reference: https://structured-data-for-wp.com/docs/article/how-to-remove-all-data-on-uninstall-from-schema-structured-data-for-wp-amp/

    • This reply was modified 3 years, 5 months ago by Magazine3.

    Hi, I’m a dev of Giornalettismo and I work with @fabioambrosi.

    So we made a few tests and it seems like the plugin is trying to insert a list of wp_terms with slugs that already exists in our DB.

    For example we have the tag Facebook with the slug “facebook”. The plugin is trying to insert a wp_term with the same slug and this generate an error. If we modify the slug of our tag, the error disappear because the plugin is able to add its wp_term. Problem is : we cannot change the slugs of our tags because we need those for other functionalities.

    Do you think you can add a control in your plugin code, in your next update, to check if the slugs exists before inserting the list in the DB ?

    Thanks for your help

    Plugin Author Magazine3

    (@magazine3)

    We have already checked the slug’s condition before inserting a new term in the database. But not getting what’s wrong on your end and this is occurring at your end only.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Duplicate entry ‘facebook’ for key ‘slug’’ is closed to new replies.