• Resolved adampoly

    (@adampoly)


    Yoast 18.3 is appearing in the error_log file with multiple errors like this. What do they mean, and how can they be fixed? Only started since update to 18.3.

    [15-Mar-2022 08:12:30 UTC] WordPress database error Duplicate entry '1305-0' for key 'PRIMARY' for query INSERT INTOwp_yoast_indexable_hierarchy(indexable_id,ancestor_id,depth,blog_id) VALUES ('1305', '0', '0', '1') made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, WP_REST_Posts_Controller->get_item, WP_REST_Attachments_Controller->prepare_item_for_response, WP_REST_Posts_Controller->prepare_item_for_response, WP_REST_Controller->add_additional_fields_to_object, Yoast\WP\SEO\Routes\Yoast_Head_REST_Field->for_post, Yoast\WP\SEO\Actions\Indexables\Indexable_Head_Action->for_post, Yoast\WP\SEO\Actions\Indexables\Indexable_Head_Action->with_404_fallback, Yoast\WP\SEO\Surfaces\Values\Meta->get_head, Yoast\WP\SEO\Surfaces\Values\Meta->create_html_presentation, 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->get_ancestors, Yoast\WP\SEO\Repositories\Indexable_Hierarchy_Repository->find_ancestors, 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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Maybellyne

    (@maybellyne)

    Hello Adam,

    We are sorry about that WordPress database error. It seems the error occurred during data insertion into the database table while indexing. 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 making important changes on your website.

    Thread Starter adampoly

    (@adampoly)

    Thank you @maybellyne

    We have tried this. This error reoccurs each time we publish a post. The time of the error always equals the time of the post being published. We have observed this in 2 sites, and only since Yoast 18.3

    Plugin Support Michael Tiña

    (@mikes41720)

    Hi,

    Just to clarify, you’ve already reset the indexables using the Yoast Test Helper plugin and completed the SEO data optimization process again, right?

    And you still get this error every time you publish a new post after finishing the said process?

    Could you check if you are still able to reproduce this error even with just a default WP theme and only Yoast SEO 18.3 as the plugin enabled?

    Thread Starter adampoly

    (@adampoly)

    Hi

    Yes, I have already reset the indexables using the Yoast Test Helper plugin and completed the SEO data optimization process again.

    The error doesn’t happen if I used wp-rollback to go back to 18.2.

    Upgrading back to 18.3 it resurfaces. Resetting indexables onces doesn’t fix it. However, after resetting the indexables a few times, it appears to fix it. But after a few posts comes back.

    Plugin Support Michael Tiña

    (@mikes41720)

    Hi @adampoly

    Upon checking the changelog, we don’t see any changes relating to the database tables from 18.2 to 18.3 that would explain this issue.

    There was an older GitHub issue here, but it was already closed after suggesting the reindexing with the Yoast Test Helper plugin.

    If this still occurs with just a default WP theme and only the Yoast SEO 18.3 plugin, we suggest logging a bug report here – https://yoast.com/help/how-to-write-a-good-bug-report/

    I marked this thread as resolved due to a lack of activity by the original poster. The original poster is always welcome to re-open this topic.

    If you are not the original poster but have a similar issue, please read this post before opening a new request.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘WordPress database error Duplicate entry’ is closed to new replies.