SQL error on indexing
-
My error log is filled with SQL-related errors and Yoast seems unable to index content. I’ve tried using WP CLI to reset the index and re-index but the errors persist. Only one line is successfully inserted into the table, then every subsequent insert fails with an error like the following (redacted):
WordPress database error Duplicate entry '0' for key 'PRIMARY' for query INSERT INTO wp_*****_yoast_indexable (object_id, object_type, permalink, title, description, is_cornerstone, is_robots_noindex, is_robots_nofollow, is_robots_noarchive, is_robots_noimageindex, is_robots_nosnippet, is_public, has_public_posts, blog_id, open_graph_image, open_graph_image_id, open_graph_image_source, open_graph_image_meta, twitter_image, twitter_image_id, twitter_image_source, permalink_hash, created_at, updated_at) VALUES ('7', 'user', 'https://****/author/****/', NULL, NULL, '0', '0', NULL, NULL, NULL, NULL, NULL, '0', '1', 'https://1.gravatar.com/avatar/*****?s=500&d=mm&r=g', NULL, 'gravatar-image', NULL, 'https://1.gravatar.com/avatar/*****?s=500&d=mm&r=g', NULL, 'gravatar-image', '51:ba05f9dd52d2a7327be4ebb59b02f3a3', '2021-07-27 01:14:03', '2021-07-27 01:14:03') made by require_once('/usr/local/wp/php/wp-cli.php'), WP_CLI\bootstrap, WP_CLI\Bootstrap\LaunchRunner->process, WP_CLI\Runner->start, WP_CLI\Runner->run_command_and_exit, WP_CLI\Runner->run_command, WP_CLI\Dispatcher\Subcommand->invoke, call_user_func, WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}, call_user_func, Yoast\WP\SEO\Commands\Index_Command->index, Yoast\WP\SEO\Commands\Index_Command->run_indexation_actions, Yoast\WP\SEO\Commands\Index_Command->run_indexation_action, Yoast\WP\SEO\Actions\Indexing\Indexable_Post_Indexation_Action->index, Yoast\WP\SEO\Repositories\Indexable_Repository->find_by_id_and_type, Yoast\WP\SEO\Builders\Indexable_Builder->build_for_id_and_type, Yoast\WP\SEO\Builders\Indexable_Builder->save_indexable, do_action('wpseo_save_indexable'), WP_Hook->do_action, WP_Hook->apply_filters, Yoast\WP\SEO\Integrations\Watchers\Indexable_Post_Watcher->updated_indexable, Yoast\WP\SEO\Integrations\Watchers\Indexable_Post_Watcher->update_has_public_posts, Yoast\WP\SEO\Repositories\Indexable_Repository->find_by_id_and_type, Yoast\WP\SEO\Builders\Indexable_Builder->build_for_id_and_type, Yoast\WP\SEO\Builders\Indexable_Builder->save_indexable, Yoast\WP\SEO\Models\Indexable->save, Yoast\WP\Lib\Model->save, Yoast\WP\Lib\ORM->save, Yoast\WP\Lib\ORM::executeThis site is using the Divi theme.
The topic ‘SQL error on indexing’ is closed to new replies.