• Resolved bjrnet21

    (@bjrnet21)


    I’ve been getting this PHP error every few days. Last error was on Nov 22. Any ideas???

    WordPress database error Duplicate entry ‘2-0’ for key ‘PRIMARY’ for query INSERT INTO wpfd_yoast_indexable_hierarchy (indexable_id, ancestor_id, depth, blog_id) VALUES (‘2’, ‘0’, ‘0’, ‘1’) made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/twentyfourteen/index.php’), get_header, locate_template, load_template, require_once(‘/themes/twentyfourteen/header.php’), wp_head, do_action(‘wp_head’), WP_Hook->do_action, WP_Hook->apply_filters, Yoast\WP\SEO\Integrations\Front_End_Integration->call_wpseo_head, do_action(‘wpseo_head’), WP_Hook->do_action, WP_Hook->apply_filters, Yoast\WP\SEO\Integrations\Front_End_Integration->present_head, Yoast\WP\SEO\Presenters\Schema_Presenter->present, Yoast\WP\SEO\Presenters\Schema_Presenter->get, Yoast\WP\SEO\Presentations\Abstract_Presentation->__get, Yoast\WP\SEO\Presentations\Indexable_Presentation->generate_schema, Yoast\WP\SEO\Generators\Schema_Generator->generate, Yoast\WP\SEO\Generators\Schema_Generator->generate_graph, Yoast\WP\SEO\Generators\Schema\Breadcrumb->generate, Yoast\WP\SEO\Presentations\Abstract_Presentation->__get, Yoast\WP\SEO\Presentations\Indexable_Presentation->generate_breadcrumbs, Yoast\WP\SEO\Generators\Breadcrumbs_Generator->generate, Yoast\WP\SEO\Repositories\Indexable_Repository->find_by_id_and_type, Yoast\WP\SEO\Repositories\Indexable_Repository->upgrade_indexable, Yoast\WP\SEO\Builders\Indexable_Builder->build, Yoast\WP\SEO\Builders\Indexable_Hierarchy_Builder->build, Yoast\WP\SEO\Builders\Indexable_Hierarchy_Builder->save_ancestors, Yoast\WP\SEO\Repositories\Indexable_Hierarchy_Repository->add_ancestor, Yoast\WP\Lib\Model->save, Yoast\WP\Lib\ORM->save, Yoast\WP\Lib\ORM::execute

    • This topic was modified 3 years ago by bjrnet21.

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Michael Ti?a

    (@mikes41720)

    Hi @bjrnet21

    We’re sorry to hear that you’re encountering this issue. We do see that you are on the latest version of Yoast SEO v17.6.

    Can you please try resetting our indexables in the database tables by following the steps below?
    1. Install & activate the?Yoast Test Helper plugin
    2. Go to Tools > Yoast Test
    3. Locate the Yoast SEO section and click on the ‘Reset indexables tables & migrations’, ‘Reset Prominent words calculation’, and ‘Reset Internal link counter’ buttons. After each click, the page will reload to confirm that each reset was successful. Note: Resetting the optimization doesn’t undo any of the hard work you’ve put into the plugin as the SEO data is also stored in WordPress’ default tables. It’ll just reset the custom Yoast tables that contain the combined data pulled from those default tables.
    4. Go to SEO > Tools, and under SEO data, click the “Start SEO data optimization” button to allow Yoast to rescan your?content.

    For your site’s health and safety, we recommend creating regular backups of your site and database. This is especially important before installing, updating, or removing plugins. Learn more about the benefits of regular backups.

    Once you’ve reset the data and re-run the SEO data optimization process, could you then check if you are still receiving these PHP errors in your server logs?

    zaydB

    (@zaydb)

    Thank you sooo much! This literally saved me hours of work!

    Plugin Support Michael Ti?a

    (@mikes41720)

    Hi,

    We’re glad to hear that helped resolve the issue for you.

    Once the data has been reset and the SEO data optimization process has completed, we would expect that all of the data would be corrected and there wouldn’t be any issues with the indexables in the database tables anymore.

    We’ll be closing this thread. Please do feel free to reopen or create a new topic if you have any other questions or concerns.

    Thread Starter bjrnet21

    (@bjrnet21)

    Thank you for the advice. I followed your instructions and used the Yoast Tester plugin to reset some things.

    After completion, I checked my logs and I see 2 entries with:

    WordPress database error Table 'blackj90_wp958.wpfd_yoast_prominent_words' doesn't exist for query TRUNCATE TABLE wpfd_yoast_prominent_words made by do_action('admin_post_wordpress-seo-feature-reset'), WP_Hook->do_action, WP_Hook->apply_filters, Yoast\WP\Test_Helper\WordPress_Plugin_Features->handle_reset_feature, Yoast\WP\Test_Helper\WordPress_Plugin_Features->reset_feature, Yoast\WP\Test_Helper\WordPress_Plugins\Yoast_SEO->reset_feature, Yoast\WP\Test_Helper\WordPress_Plugins\Yoast_SEO->reset_prominent_words_calculation

    I will let you know if any other errors pop up.

    thorge

    (@thorgepetersen)

    Same here..

    [error] 125065#125065: *847 FastCGI sent in stderr: "PHP message: WordPress-Datenbank-Fehler Table 'foobar.wp_yoast_prominent_words' doesn't exist für Abfrage TRUNCATE TABLE wp_yoast_prominent_words von do_action('admin_post_wordpress-seo-feature-reset'), WP_Hook->do_action, WP_Hook->apply_filters, Yoast\WP\Test_Helper\WordPress_Plugin_Features->handle_reset_feature, Yoast\WP\Test_Helper\WordPress_Plugin_Features->reset_feature, Yoast\WP\Test_Helper\WordPress_Plugins\Yoast_SEO->reset_feature, Yoast\WP\Test_Helper\WordPress_Plugins\Yoast_SEO->reset_prominent_words_calculation

    Resetting indexables and migrations helps. I don’t have this error anymore in my logs, but the optimization process still does not complete. My browser throws js error o.objects is undefined and posts a lot of empty posts to mywebsite.com/wp-admin/undefined that get a 404.

    Maybe it relates to the same problem? If not, I don’t want to hijack this thread ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘PHP Error: WordPress database error Duplicate entry’ is closed to new replies.