• Resolved onlanka

    (@onlanka)


    I’m getting the following error_log even after running the Yoast Test Helper plugin.

    I did Reset Indexable tables & migrations then Start SEO data Optimization

    But after doing that I got the following error_log and I repeat the same thing again and again but the issue still persists.

    Please give me a solution for this error,

    [18-Nov-2021 08:12:15 UTC] WordPress database error Duplicate entry '27399-0' for key 'PRIMARY' for query INSERT INTO'wp_yoast_indexable_hierarchy'('indexable_id','ancestor_id','depth','blog_id') VALUES ('27399', '0', '0', '1') made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/themename/single.php'), get_header, locate_template, load_template, require_once('/themes/themename/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->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

    • This topic was modified 3 years ago by onlanka. Reason: characters
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Michael Ti?a

    (@mikes41720)

    Hi @onlanka

    Could you let us know if you are running the latest version of WordPress 5.8.2, Yoast SEO 17.6, the latest version of your plugins and themes, and are meeting the necessary plugin requirements?

    Regarding the WordPress database error Duplicate entry '27399-0' for key 'PRIMARY' for query INSERT INTO'wp_yoast_indexable_hierarchy' error that is being reported, we understand you’ve already tried to reset the indexables using the Yoast Test Helper tool. Just to clarify, were you able to complete the SEO data optimization process and did it prompt that it was already completed?

    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.

    Thread Starter onlanka

    (@onlanka)

    WordPress, Themes and Plugins were already updated and on the latest version.

    I also did the following steps 4 times upto now but no success.

    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.
    4. Go to SEO > Tools, and under SEO data, click the “Start SEO data optimization” button to allow Yoast to rescan your content.
    4.1. After doing first 3 steps I also tried with WP-CLI command wp yoast index –reindex

    But still I’m getting the error_log.

    [19-Nov-2021 08:04:45 UTC] WordPress database error Duplicate entry '27157-0' for key 'PRIMARY' for query INSERT INTO 'wp_yoast_indexable_hierarchy' ('indexable_id', 'ancestor_id', 'depth', 'blog_id') VALUES ('27157', '0', '0', '1') made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/boldr-lite/single.php'), get_header, locate_template, load_template, require_once('/themes/boldr-lite/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->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

    • This reply was modified 3 years ago by onlanka.
    Thread Starter onlanka

    (@onlanka)

    @mikes41720 Finally I was able to fix this issue.

    What I did was before starting the reset and indexing process, I removed all the custom settings in MySQL configuration file in my linux VPS (my.cnf).

    Then ran previous steps and checked 24 hours for error_log, still no new error_log found.

    Thread Starter onlanka

    (@onlanka)

    @mikes41720 After 02 days now I can see error_log again.

    My wordpress site has over 20,000 posts.

    Thread Starter onlanka

    (@onlanka)

    @mikes41720 I deleted last error_log and continuously monitoring because some error_log appear not in real time.

    There might be no issue.

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