Database error after update
-
Hello,
My site got a database error after updated to the latest Yoast. (sorry it has been a long time since didn’t update, so it was a big jump) and I got this database error.
SELECT COUNT(ID) FROM wp_posts WHERE ( ID NOT IN ( SELECT object_id FROM wp_yoast_indexable WHERE link_count IS NOT NULL AND object_type = ‘post’ ) OR ID IN ( SELECT DISTINCT post_id FROM wp_yoast_seo_links WHERE target_indexable_id IS NULL AND
type
= ‘internal’ AND target_post_id IS NOT NULL AND target_post_id != 0 ) ) AND post_status = ‘publish’ AND post_type IN (‘post’, ‘page’, ‘attachment’, ‘product’)All other plugins and WP core are up to date, and I also tried to switch off all plugins and set it back to the default WordPress theme, nothing worked. Could someone please help? Great thanks!
-
Hello,
We are sorry about the database error you received after updating the plugin. Can you please delete the plugin and reinstall to see if the issue will re-occur?
Thanks
Hello
Thanks for the reply, no it doesnt work
I checked my debug log, this is what I got when I reinstall the plugin, thanks!
[16-Mar-2021 16:19:16 UTC] WordPress database error Unknown error 1054 for query SELECT COUNT(ID) FROM wp_posts WHERE ( ID NOT IN ( SELECT object_id FROM wp_yoast_indexable WHERE link_count IS NOT NULL AND object_type = 'post' ) OR ID IN ( SELECT DISTINCT post_id FROM wp_yoast_seo_links WHERE target_indexable_id IS NULL AND <code>type</code> = 'internal' AND target_post_id IS NOT NULL AND target_post_id != 0 ) ) AND post_status = 'publish' AND post_type IN ('post', 'page', 'attachment', 'product') made by require_once('wp-admin/admin.php'), do_action('admin_init'), WP_Hook->do_action, WP_Hook->apply_filters, Yoast\WP\SEO\Integrations\Admin\Background_Indexing_Integration->register_shutdown_indexing, Yoast\WP\SEO\Helpers\Indexing_Helper->get_unindexed_count, Yoast\WP\SEO\Actions\Indexing\Abstract_Link_Indexing_Action->get_total_unindexed [16-Mar-2021 16:19:16 UTC] WordPress database error Unknown error 1054 for query SELECT COUNT(ID) FROM wp_posts WHERE ( ID NOT IN ( SELECT object_id FROM wp_yoast_indexable WHERE link_count IS NOT NULL AND object_type = 'post' ) OR ID IN ( SELECT DISTINCT post_id FROM wp_yoast_seo_links WHERE target_indexable_id IS NULL AND <code>type</code> = 'internal' AND target_post_id IS NOT NULL AND target_post_id != 0 ) ) AND post_status = 'publish' AND post_type IN ('post', 'page', 'attachment', 'product') made by require_once('wp-admin/admin.php'), do_action('admin_init'), WP_Hook->do_action, WP_Hook->apply_filters, Yoast\WP\SEO\Integrations\Admin\Indexing_Notification_Integration->maybe_create_notification, Yoast\WP\SEO\Integrations\Admin\Indexing_Notification_Integration->should_show_notification, Yoast\WP\SEO\Helpers\Indexing_Helper->get_filtered_unindexed_count, Yoast\WP\SEO\Helpers\Indexing_Helper->get_unindexed_count, Yoast\WP\SEO\Actions\Indexing\Abstract_Link_Indexing_Action->get_total_unindexed [16-Mar-2021 16:19:16 UTC] WordPress database error Unknown error 1054 for query SELECT COUNT(ID) FROM wp_posts WHERE ( ID NOT IN ( SELECT object_id FROM wp_yoast_indexable WHERE link_count IS NOT NULL AND object_type = 'post' ) OR ID IN ( SELECT DISTINCT post_id FROM wp_yoast_seo_links WHERE target_indexable_id IS NULL AND <code>type</code> = 'internal' AND target_post_id IS NOT NULL AND target_post_id != 0 ) ) AND post_status = 'publish' AND post_type IN ('post', 'page', 'attachment', 'product') made by require_once('wp-admin/admin.php'), do_action('admin_init'), WP_Hook->do_action, WP_Hook->apply_filters, Yoast\WP\SEO\Integrations\Admin\Indexing_Notification_Integration->maybe_create_notification, Yoast\WP\SEO\Integrations\Admin\Indexing_Notification_Integration->notification, Yoast\WP\SEO\Integrations\Admin\Indexing_Notification_Integration->get_presenter, Yoast\WP\SEO\Helpers\Indexing_Helper->get_filtered_unindexed_count, Yoast\WP\SEO\Helpers\Indexing_Helper->get_unindexed_count, Yoast\WP\SEO\Actions\Indexing\Abstract_Link_Indexing_Action->get_total_unindexed [16-Mar-2021 16:19:48 UTC] WordPress database error Unknown error 1054 for query SELECT COUNT(ID) FROM wp_posts WHERE ( ID NOT IN ( SELECT object_id FROM wp_yoast_indexable WHERE link_count IS NOT NULL AND object_type = 'post' ) OR ID IN ( SELECT DISTINCT post_id FROM wp_yoast_seo_links WHERE target_indexable_id IS NULL AND <code>type</code> = 'internal' AND target_post_id IS NOT NULL AND target_post_id != 0 ) ) AND post_status = 'publish' AND post_type IN ('post', 'page', 'attachment', 'product') made by do_action('admin_init'), WP_Hook->do_action, WP_Hook->apply_filters, Yoast\WP\SEO\Integrations\Admin\Indexing_Notification_Integration->maybe_create_notification, Yoast\WP\SEO\Integrations\Admin\Indexing_Notification_Integration->should_show_notification, Yoast\WP\SEO\Helpers\Indexing_Helper->get_filtered_unindexed_count, Yoast\WP\SEO\Helpers\Indexing_Helper->get_unindexed_count, Yoast\WP\SEO\Actions\Indexing\Abstract_Link_Indexing_Action->get_total_unindexed [16-Mar-2021 16:20:18 UTC] WordPress database error Unknown error 1054 for query SELECT COUNT(ID) FROM wp_posts WHERE ( ID NOT IN ( SELECT object_id FROM wp_yoast_indexable WHERE link_count IS NOT NULL AND object_type = 'post' ) OR ID IN ( SELECT DISTINCT post_id FROM wp_yoast_seo_links WHERE target_indexable_id IS NULL AND <code>type</code> = 'internal' AND target_post_id IS NOT NULL AND target_post_id != 0 ) ) AND post_status = 'publish' AND post_type IN ('post', 'page', 'attachment', 'product') made by do_action('admin_init'), WP_Hook->do_action, WP_Hook->apply_filters, Yoast\WP\SEO\Integrations\Admin\Indexing_Notification_Integration->maybe_create_notification, Yoast\WP\SEO\Integrations\Admin\Indexing_Notification_Integration->should_show_notification, Yoast\WP\SEO\Helpers\Indexing_Helper->get_filtered_unindexed_count, Yoast\WP\SEO\Helpers\Indexing_Helper->get_unindexed_count, Yoast\WP\SEO\Actions\Indexing\Abstract_Link_Indexing_Action->get_total_unindexed [16-Mar-2021 16:20:43 UTC] WordPress database error Unknown error 1054 for query SELECT COUNT(ID) FROM wp_posts WHERE ( ID NOT IN ( SELECT object_id FROM wp_yoast_indexable WHERE link_count IS NOT NULL AND object_type = 'post' ) OR ID IN ( SELECT DISTINCT post_id FROM wp_yoast_seo_links WHERE target_indexable_id IS NULL AND <code>type</code> = 'internal' AND target_post_id IS NOT NULL AND target_post_id != 0 ) ) AND post_status = 'publish' AND post_type IN ('post', 'page', 'attachment', 'product') made by require_once('wp-admin/admin.php'), do_action('admin_init'), WP_Hook->do_action, WP_Hook->apply_filters, Yoast\WP\SEO\Integrations\Admin\Background_Indexing_Integration->register_shutdown_indexing, Yoast\WP\SEO\Helpers\Indexing_Helper->get_unindexed_count, Yoast\WP\SEO\Actions\Indexing\Abstract_Link_Indexing_Action->get_total_unindexed [16-Mar-2021 16:20:43 UTC] WordPress database error Unknown error 1054 for query SELECT COUNT(ID) FROM wp_posts WHERE ( ID NOT IN ( SELECT object_id FROM wp_yoast_indexable WHERE link_count IS NOT NULL AND object_type = 'post' ) OR ID IN ( SELECT DISTINCT post_id FROM wp_yoast_seo_links WHERE target_indexable_id IS NULL AND <code>type</code> = 'internal' AND target_post_id IS NOT NULL AND target_post_id != 0 ) ) AND post_status = 'publish' AND post_type IN ('post', 'page', 'attachment', 'product') made by require_once('wp-admin/admin.php'), do_action('admin_init'), WP_Hook->do_action, WP_Hook->apply_filters, Yoast\WP\SEO\Integrations\Admin\Indexing_Notification_Integration->maybe_create_notification, Yoast\WP\SEO\Integrations\Admin\Indexing_Notification_Integration->should_show_notification, Yoast\WP\SEO\Helpers\Indexing_Helper->get_filtered_unindexed_count, Yoast\WP\SEO\Helpers\Indexing_Helper->get_unindexed_count, Yoast\WP\SEO\Actions\Indexing\Abstract_Link_Indexing_Action->get_total_unindexed [16-Mar-2021 16:20:44 UTC] WordPress database error Unknown error 1054 for query SELECT COUNT(ID) FROM wp_posts WHERE ( ID NOT IN ( SELECT object_id FROM wp_yoast_indexable WHERE link_count IS NOT NULL AND object_type = 'post' ) OR ID IN ( SELECT DISTINCT post_id FROM wp_yoast_seo_links WHERE target_indexable_id IS NULL AND <code>type</code> = 'internal' AND target_post_id IS NOT NULL AND target_post_id != 0 ) ) AND post_status = 'publish' AND post_type IN ('post', 'page', 'attachment', 'product') made by require_once('wp-admin/admin.php'), do_action('admin_init'), WP_Hook->do_action, WP_Hook->apply_filters, Yoast\WP\SEO\Integrations\Admin\Background_Indexing_Integration->register_shutdown_indexing, Yoast\WP\SEO\Helpers\Indexing_Helper->get_unindexed_count, Yoast\WP\SEO\Actions\Indexing\Abstract_Link_Indexing_Action->get_total_unindexed [16-Mar-2021 16:20:44 UTC] WordPress database error Unknown error 1054 for query SELECT COUNT(ID) FROM wp_posts WHERE ( ID NOT IN ( SELECT object_id FROM wp_yoast_indexable WHERE link_count IS NOT NULL AND object_type = 'post' ) OR ID IN ( SELECT DISTINCT post_id FROM wp_yoast_seo_links WHERE target_indexable_id IS NULL AND <code>type</code> = 'internal' AND target_post_id IS NOT NULL AND target_post_id != 0 ) ) AND post_status = 'publish' AND post_type IN ('post', 'page', 'attachment', 'product') made by require_once('wp-admin/admin.php'), do_action('admin_init'), WP_Hook->do_action, WP_Hook->apply_filters, Yoast\WP\SEO\Integrations\Admin\Indexing_Notification_Integration->maybe_create_notification, Yoast\WP\SEO\Integrations\Admin\Indexing_Notification_Integration->should_show_notification, Yoast\WP\SEO\Helpers\Indexing_Helper->get_filtered_unindexed_count, Yoast\WP\SEO\Helpers\Indexing_Helper->get_unindexed_count, Yoast\WP\SEO\Actions\Indexing\Abstract_Link_Indexing_Action->get_total_unindexed [16-Mar-2021 16:20:48 UTC] WordPress database error Unknown error 1054 for query SELECT COUNT(ID) FROM wp_posts WHERE ( ID NOT IN ( SELECT object_id FROM wp_yoast_indexable WHERE link_count IS NOT NULL AND object_type = 'post' ) OR ID IN ( SELECT DISTINCT post_id FROM wp_yoast_seo_links WHERE target_indexable_id IS NULL AND <code>type</code> = 'internal' AND target_post_id IS NOT NULL AND target_post_id != 0 ) ) AND post_status = 'publish' AND post_type IN ('post', 'page', 'attachment', 'product') made by do_action('admin_init'), WP_Hook->do_action, WP_Hook->apply_filters, Yoast\WP\SEO\Integrations\Admin\Indexing_Notification_Integration->maybe_create_notification, Yoast\WP\SEO\Integrations\Admin\Indexing_Notification_Integration->should_show_notification, Yoast\WP\SEO\Helpers\Indexing_Helper->get_filtered_unindexed_count, Yoast\WP\SEO\Helpers\Indexing_Helper->get_unindexed_count, Yoast\WP\SEO\Actions\Indexing\Abstract_Link_Indexing_Action->get_total_unindexed [16-Mar-2021 16:21:05 UTC] WordPress database error Unknown error 1054 for query SELECT COUNT(ID) FROM wp_posts WHERE ( ID NOT IN ( SELECT object_id FROM wp_yoast_indexable WHERE link_count IS NOT NULL AND object_type = 'post' ) OR ID IN ( SELECT DISTINCT post_id FROM wp_yoast_seo_links WHERE target_indexable_id IS NULL AND <code>type</code> = 'internal' AND target_post_id IS NOT NULL AND target_post_id != 0 ) ) AND post_status = 'publish' AND post_type IN ('post', 'page', 'attachment', 'product') made by require_once('wp-admin/admin.php'), do_action('admin_init'), WP_Hook->do_action, WP_Hook->apply_filters, Yoast\WP\SEO\Integrations\Admin\Background_Indexing_Integration->register_shutdown_indexing, Yoast\WP\SEO\Helpers\Indexing_Helper->get_unindexed_count, Yoast\WP\SEO\Actions\Indexing\Abstract_Link_Indexing_Action->get_total_unindexed [16-Mar-2021 16:21:05 UTC] WordPress database error Unknown error 1054 for query SELECT COUNT(ID) FROM wp_posts WHERE ( ID NOT IN ( SELECT object_id FROM wp_yoast_indexable WHERE link_count IS NOT NULL AND object_type = 'post' ) OR ID IN ( SELECT DISTINCT post_id FROM wp_yoast_seo_links WHERE target_indexable_id IS NULL AND <code>type</code> = 'internal' AND target_post_id IS NOT NULL AND target_post_id != 0 ) ) AND post_status = 'publish' AND post_type IN ('post', 'page', 'attachment', 'product') made by require_once('wp-admin/admin.php'), do_action('admin_init'), WP_Hook->do_action, WP_Hook->apply_filters, Yoast\WP\SEO\Integrations\Admin\Indexing_Notification_Integration->maybe_create_notification, Yoast\WP\SEO\Integrations\Admin\Indexing_Notification_Integration->should_show_notification, Yoast\WP\SEO\Helpers\Indexing_Helper->get_filtered_unindexed_count, Yoast\WP\SEO\Helpers\Indexing_Helper->get_unindexed_count, Yoast\WP\SEO\Actions\Indexing\Abstract_Link_Indexing_Action->get_total_unindexed
Thanks for sharing the relevant database queries from the debug log here with us. We are afraid to say the relevant debug log doesn’t say what’s the exact error is as it’s showing an unknown error which is very odd and makes the whole thing clueless for us to investigate.
That said, can you please confirm what exactly happens on your site due to the relevant database query? Do you see any errors on your site? Are you unable to access your website or something else?
We look forward to hearing from you.
We are going ahead and marking this issue as resolved due to inactivity. If you require any further assistance please create a new issue.
- The topic ‘Database error after update’ is closed to new replies.