Yoast / wordpress-seo

Yoast SEO for WordPress
https://yoast.com/wordpress/plugins/seo/
Other
1.75k stars 885 forks source link

Unable to create missing tables #16205

Closed thoaud closed 2 years ago

thoaud commented 3 years ago

Please give us a description of what happened.

For some unknown reason, many database tables are missing. Including:

The plugin was updated today to 15.1, and right after the update the errorlog started to fill up with errors.

WordPress database error Table 'REDACTEDNAME.wp_yoast_primary_term' doesn't exist for query INSERT INTO `wp_yoast_primary_term` (`term_id`, `post_id`, `taxonomy`, `blog_id`, `created_at`, `updated_at`) VALUES ('20264', '46171', 'category', '1', '2020-10-14 14:48:11', '2020-10-14 14:48:11') made by include('phar:///usr/bin/wp-cli/php/boot-phar.php'), include('phar:///usr/bin/wp-cli/vendor/wp-cli/wp-cli/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\Indexation\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_Post_Builder->build, Yoast\WP\SEO\Builders\Indexable_Post_Builder->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\Primary_Term_Builder->build, Yoast\WP\SEO\Builders\Primary_Term_Builder->save_primary_term, Yoast\WP\Lib\Model->save, Yoast\WP\Lib\ORM->save, Yoast\WP\Lib\ORM::execute WordPress database error Table 'REDACTEDNAME.wp_yoast_primary_term' doesn't exist for query SELECT * FROM `wp_yoast_primary_term` WHERE `post_id` = '46174' AND `taxonomy` = 'category' LIMIT 1 made by include('phar:///usr/bin/wp-cli/php/boot-phar.php'), include('phar:///usr/bin/wp-cli/vendor/wp-cli/wp-cli/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\Indexation\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_Post_Builder->build, Yoast\WP\SEO\Builders\Indexable_Post_Builder->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\Primary_Term_Builder->build, Yoast\WP\SEO\Builders\Primary_Term_Builder->save_primary_term, Yoast\WP\SEO\Repositories\Primary_Term_Repository->find_by_post_id_and_taxonomy, Yoast\WP\Lib\ORM->find_one, Yoast\WP\Lib\ORM->run, Yoast\WP\Lib\ORM::execute

WordPress database error Table 'REDACTEDNAME.wp_yoast_indexable' doesn't exist for query SELECT * FROM `wp_yoast_indexable` WHERE `permalink_hash` = '79:d4a105041103939e48b08ae6a18ccece' AND `permalink` = 'https://www.REDACTEDNAME.com/wp-content/uploads/2019/01/shutterstock_1230899410.jpg' LIMIT 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_Posts_Controller->get_items, 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\\Surfaces\\Meta_Surface->for_post, 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\\Builders\\Indexable_Link_Builder->build, Yoast\\WP\\SEO\\Builders\\Indexable_Link_Builder->create_links, array_map, Yoast\\WP\\SEO\\Builders\\Indexable_Link_Builder->Yoast\\WP\\SEO\\Builders\\{closure}, Yoast\\WP\\SEO\\Builders\\Indexable_Link_Builder->create_internal_link, 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\\Builders\\Indexable_Link_Builder->build, Yoast\\WP\\SEO\\Builders\\Indexable_Link_Builder->create_links, array_map, Yoast\\WP\\SEO\\Builders\\Indexable_Link_Builder->Yoast\\WP\\SEO\\Builders\\{closure}, Yoast\\WP\\SEO\\Builders\\Indexable_Link_Builder->create_internal_link, Yoast\\WP\\SEO\\Builders\\Indexable_Link_Builder->get_post_id, Yoast\\WP\\SEO\\Helpers\\Image_Helper->get_attachment_by_url, 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_Post_Builder->build, Yoast\\WP\\SEO\\Builders\\Indexable_Post_Builder->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, 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\\Builders\\Indexable_Link_Builder->build, Yoast\\WP\\SEO\\Builders\\Indexable_Link_Builder->create_links, array_map, Yoast\\WP\\SEO\\Builders\\Indexable_Link_Builder->Yoast\\WP\\SEO\\Builders\\{closure}, Yoast\\WP\\SEO\\Builders\\Indexable_Link_Builder->create_internal_link, Yoast\\WP\\SEO\\Builders\\Indexable_Link_Builder->get_post_id, Yoast\\WP\\SEO\\Helpers\\Image_Helper->get_attachment_by_url, 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_Post_Builder->build, Yoast\\WP\\SEO\\Builders\\Indexable_Post_Builder->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, 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\\Builders\\Indexable_Link_Builder->build, Yoast\\WP\\SEO\\Builders\\Indexable_Link_Builder->create_links, array_map, Yoast\\WP\\SEO\\Builders\\Indexable_Link_Builder->Yoast\\WP\\SEO\\Builders\\{closure}, Yoast\\WP\\SEO\\Builders\\Indexable_Link_Builder->create_internal_link, Yoast\\WP\\SEO\\Builders\\Indexable_Link_Builder->get_post_id, Yoast\\WP\\SEO\\Helpers\\Image_Helper->get_attachment_by_url, 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_Post_Builder->build, Yoast\\WP\\SEO\\Builders\\Indexable_Post_Builder->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, 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\\Builders\\Indexable_Link_Builder->build, Yoast\\WP\\SEO\\Builders\\Indexable_Link_Builder->create_links, array_map, Yoast\\WP\\SEO\\Builders\\Indexable_Link_Builder->Yoast\\WP\\SEO\\Builders\\{closure}, Yoast\\WP\\SEO\\Builders\\Indexable_Link_Builder->create_internal_link, Yoast\\WP\\SEO\\Builders\\Indexable_Link_Builder->get_post_id, Yoast\\WP\\SEO\\Helpers\\Image_Helper->get_attachment_by_url, 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_Post_Builder->build, Yoast\\WP\\SEO\\Builders\\Indexable_Post_Builder->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, 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\\Builders\\Indexable_Link_Builder->build, Yoast\\WP\\SEO\\Builders\\Indexable_Link_Builder->create_links, array_map, Yoast\\WP\\SEO\\Builders\\Indexable_Link_Builder->Yoast\\WP\\SEO\\Builders\\{closure}, Yoast\\WP\\SEO\\Builders\\Indexable_Link_Builder->create_internal_link, Yoast\\WP\\SEO\\Builders\\Indexable_Link_Builder->get_post_id, Yoast\\WP\\SEO\\Helpers\\Image_Helper->get_attachment_by_url, 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_Post_Builder->build, Yoast\\WP\\SEO\\Builders\\Indexable_Post_Builder->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, 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\\Builders\\Indexable_Link_Builder->build, Yoast\\WP\\SEO\\Builders\\Indexable_Link_Builder->create_links, array_map, Yoast\\WP\\SEO\\Builders\\Indexable_Link_Builder->Yoast\\WP\\SEO\\Builders\\{closure}, Yoast\\WP\\SEO\\Builders\\Indexable_Link_Builder->create_internal_link, Yoast\\WP\\SEO\\Builders\\Indexable_Link_Builder->get_post_id, Yoast\\WP\\SEO\\Helpers\\Image_Helper->get_attachment_by_url, 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_Post_Builder->build, Yoast\\WP\\SEO\\Builders\\Indexable_Post_Builder->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, do_action('wpseo_save_indexable'), WP_Hook->do_action, WP_Hook->apply_filters,

I tried to reindex using wp yoast index --reindex and wp yoast index with the yoast-test-helper. But it doesn't seem like it creates missing tables. And I can't find a CLI function, or any function for that matter, which creates missing tables.

Please describe what you expected to happen and why.

I expected that the plugin had a repair function which could create missing tables.

How can we reproduce this behavior?

  1. Delete yoast tables
  2. Run indexing

Technical info

karinclimber commented 3 years ago

I came here before turning on debugging to look at errors for myself, but on a site using WordPress 5.5.1, Genesis 3.3.3, and Yoast Premium 15.1.1, I also had the same issue. We were testing it and updating early to see if we could fix the orphaned content issue that 14.9 presented - if I click "Start SEO data optimization" it runs for 5 - 10 minutes, then says it is complete. But then it appears that nothing has actually happened and the button comes back. Same with running it through wp-cli.

Djennez commented 3 years ago

@thoaud are you able to tell us some more? Like from what version did you update to 15.1? How did you update (any special tools, manually replacing files, clicking update, et cetera)? Also, is the prefix in your logs the right one? Do you have any systems that clean up database tables?

Also, does the WordPress database user at least have the CREATE, DROP, INDEX and UPDATE privileges?

remkus commented 3 years ago

Hey Jannes, hoe istie?! :)

Client updated from the last 14.x version through WordPress' plugin update option. Pretty standard stuff. Prefix is correct and we don't do anything to database tables with our systems.

And yes, the WordPress database use has all those privileges. WordPress SEO Premium 15.1.2 does not fix the issue. It's still doesn't create the missing tables.

Djennez commented 3 years ago

Hey Remkus! Gaat goed! Ik ga vanaf vandaag even vakantie houden :) Hoe is't met jou?

@dariaknl this is the issue I mentioned in my last message. I don't know how this happens, but this may be something to look into. The upgrade routines of the plugin should create the necessary tables.

@remkus Can you install the Yoast Test Helper plugin and run the "Reset indexables and migrations" button. This should run all migrations again, and I am not 100% sure the CLI command does this as well. The migrations should create all necessary tables.

remkus commented 3 years ago

@Djennez fijne vakantie!

We've already had the Yoast Test Helper plugin installed, but it did not create any tables.

dariaknl commented 3 years ago

@remkus Hi Remkus! Just to double check:

You still don't see the indexables tables?

remkus commented 3 years ago

Hey Daria,

We tried all the options, yeah, but couldn’t make it happen. We’ve worked around the problem now and kopied over the tables from a different installation and then ran the WP CLI script to reindex and that worked.

This doesn’t mean this issue is resolved necessarily, but it does mean we can’t test anymore.

.

grappler commented 3 years ago

I have the same problem but due to self-inflicted reasons. When pulling the the production database to the local environment I do not want to pull the index locally due to its size.

Is there a way to quickly re-create the tables locally? I know that other plugins check on activation if the tables exists and create them if need be.

Djennez commented 3 years ago

The tables should be re-created when you use the "reset migrations and indexables" option from the Yoast test helper plugin.

bbceg commented 3 years ago

I was suffering from the same issue but I believe only after attempting to fix the following error:

WordPress database error Unknown column 'get_endpoints' in 'field list' for query INSERT INTO 'wp_yoast_indexable' ('object_id', 'object_type', 'object_sub_type', 'permalink', 'primary_focus_keyword_score', 'readability_score', 'is_cornerstone', 'is_robots_noindex', 'is_robots_nofollow', 'is_robots_noimageindex', 'is_robots_noarchive', 'is_robots_nosnippet', 'open_graph_image', 'open_graph_image_id', 'open_graph_image_source', 'open_graph_image_meta', 'twitter_image', 'twitter_image_id', 'twitter_image_source', 'primary_focus_keyword', 'canonical', 'title', 'description', 'breadcrumb_title', 'open_graph_title', 'open_graph_description', 'twitter_title', 'twitter_description', 'estimated_reading_time_minutes', 'get_endpoints', 'author_id', 'post_parent', 'number_of_pages', 'post_status', 'is_protected', 'is_public', 'has_public_posts', 'blog_id', 'schema_page_type', 'schema_article_type', 'permalink_hash', 'created_at', 'updated_at ....

The above appeared in the error logs for a "new" site (copied from a site that already existed).

After trying the more typical steps of deleting and re-adding the plugin I cleared all references to the plugin from the wp_options and wp_postmeta table and deleted all wp_yoast tables (in an effort to get back to a clean slate). When reinstalling the plugin the tables were not recreated.

In the end I had to copy them from another site as suggested by @remkus. I could then use the test tool to clean things up and start again.

Perhaps the table didn't copy across properly initially (I can confirm that it was present in the source website) but it would be great if the plugin could try to recreate its tables if they don't exist.

Hope this helps.

airandony commented 2 years ago

Hi, I'm having a similar problem since I updated to Php 8. I cannot activate the plugin anymore.

php:8.1-rc-fpm-alpine3.14 (Docker)
Wordpress: 5.8.1
Mariadb:   10.5.4-MariaDB-1:10.5.4+maria~focal
Yoast SEO Version 17.2.1 
Yoast Test Helper: Version 1.14

Here are the error coming from the plugin, I'm having this error appearing in my meta_title : Fatal error: Uncaught mysqli_sql_exception: Table 'wordpress.yoast_wp_seo_models_indexable' doesn't exist in /var/www/html/wp-includes/wp-db.php:2056 Stack trace: #0 /var/www/html/wp-includes/wp-db.php(2056): mysqli_query(Object(mysqli), 'SELECTobject_...') #1 /var/www/html/wp-includes/wp-db.php(1945): wpdb->_doquery('SELECT `object...') #2 /var/www/html/wp-content/plugins/wordpress-seo/lib/orm.php(285): wpdb->query('SELECT object_...') #3 /var/www/html/wp-content/plugins/wordpress-seo/lib/orm.php(1952): Yoast\WP\Lib\ORM::execute('SELECTobject_...', Array) #4 /var/www/html/wp-content/plugins/wordpress-seo/lib/orm.php(438): Yoast\WP\Lib\ORM->run() #5 /var/www/html/wp-content/plugins/wordpress-seo/src/actions/indexing/indexable-post-type-archive-indexation-action.php(168): Yoast\WP\Lib\ORM->find_array() #6 /var/www/html/wp-content/plugins/wordpress-seo/src/actions/indexing/indexable-post-type-archive-indexation-action.php(129): Yoast\WP\SEO\Actions\Indexing\Indexable_Post_Type_Archive_Indexation_Action->get_indexed_post_type_archives() #7 /var/www/html/wp-content/plugins/wordpress-seo/src/actions/indexing/indexable-post-type-archive-indexation-action.php(73): Yoast\WP\SEO\Actions\Indexing\Indexable_Post_Type_Archive_Indexation_Action->get_unindexed_post_type_archives(false) #8 /var/www/html/wp-content/plugins/wordpress-seo/src/helpers/indexing-helper.php(216): Yoast\WP\SEO\Actions\Indexing\Indexable_Post_Type_Archive_Indexation_Action->get_total_unindexed() #9 /var/www/html/wp-content/plugins/wordpress-seo/src/helpers/indexing-helper.php(228): Yoast\WP\SEO\Helpers\Indexing_Helper->get_unindexed_count() #10 /var/www/html/wp-content/plugins/wordpress-seo/src/integrations/admin/indexing-notification-integration.php(234): Yoast\WP\SEO\Helpers\Indexing_Helper->get_filtered_unindexed_count() #11 /var/www/html/wp-content/plugins/wordpress-seo/src/integrations/admin/indexing-notification-integration.php(190): Yoast\WP\SEO\Integrations\Admin\Indexing_Notification_Integration->should_show_notification() #12 /var/www/html/wp-includes/class-wp-hook.php(303): Yoast\WP\SEO\Integrations\Admin\Indexing_Notification_Integration->maybe_create_notification('') #13 /var/www/html/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters(NULL, Array) #14 /var/www/html/wp-includes/plugin.php(470): WP_Hook->do_action(Array) #15 /var/www/html/wp-admin/admin.php(175): do_action('admin_init') #16 /var/www/html/wp-admin/index.php(10): require_once('/var/www/html/w...') #17 {main} thrown in /var/www/html/wp-includes/wp-db.php on line 2056`

and if I click on "Reset Indexables tables & migrations". I get this error:

Uncaught mysqli_sql_exception: Table 'wordpress.wp_yoast_prominent_words' doesn't exist in /var/www/html/wp-includes/wp-db.php:2056 Stack trace: #0 /var/www/html/wp-includes/wp-db.php(2056): mysqli_query(Object(mysqli), 'TRUNCATE TABLE ...') #1 /var/www/html/wp-includes/wp-db.php(1945): wpdb->_do_query('TRUNCATE TABLE ...') #2 /var/www/html/wp-content/plugins/yoast-test-helper/src/wordpress-plugins/yoast-seo.php(155): wpdb->query('TRUNCATE TABLE ...') #3 /var/www/html/wp-content/plugins/yoast-test-helper/src/wordpress-plugins/yoast-seo.php(225): Yoast\WP\Test_Helper\WordPress_Plugins\Yoast_SEO->reset_prominent_words_calculation() #4 /var/www/html/wp-content/plugins/yoast-test-helper/src/wordpress-plugins/yoast-seo.php(103): Yoast\WP\Test_Helper\WordPress_Plugins\Yoast_SEO->reset_indexables() #5 /var/www/html/wp-content/plugins/yoast-test-helper/src/wordpress-plugin-features.php(142): Yoast\WP\Test_Helper\WordPress_Plugins\Yoast_SEO->reset_feature('reset_indexable...') #6 /var/www/html/wp-content/plugins/yoast-test-helper/src/wordpress-plugin-features.php(104): Yoast\WP\Test_Helper\WordPress_Plugin_Features->reset_feature(Object(Yoast\WP\Test_Helper\WordPress_Plugins\Yoast_SEO)) #7 /var/www/html/wp-includes/class-wp-hook.php(303): Yoast\WP\Test_Helper\WordPress_Plugin_Features->handle_reset_feature('') #8 /var/www/html/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters('', Array) #9 /var/www/html/wp-includes/plugin.php(470): WP_Hook->do_action(Array) #10 /var/www/html/wp-admin/admin-post.php(70): do_action('admin_post_word...') #11 {main} thrown in /var/www/html/wp-includes/wp-db.php on line 2056

I'm not able to find anywhere the SQL informations to manually create those tables. Any advice ?

Thank you

rutgervanwilligen commented 2 years ago

(Sorry, this is probably not relevant for the OP's issue, but I got here because of the last post in this thread)

@airandony I encountered the same issue/error as you yesterday after upgrading PHP from 7 to 8. I'm not using Docker, but I fixed it by firstly downgrading back to PHP 7, then upgrading my Yoast plugins (Yoast SEO to 18.0 and Yoast Duplicate Post to 4.4) and WordPress to version 5.9, using the admin dashboard.

After doing that, the website kept functioning fine when upgrading to PHP 8.1.2. Note that the table mentioned in the error message (wordpress.yoast_wp_seo_indexable) still doesn't exist in my database.

Djennez commented 2 years ago

The last 2 messages in this thread are related to an error with Yoast 17.8 and below. That is fixed with Yoast 17.9 and up.

The rest of this thread is about the creation / alteration of tables during an upgrade routine. This should happen normally but may fail if the DB user does not have sufficient permissions (like ALTER). An error should be shown in the logs during the update process, listing what the reason was for the failed migration.

Since this thread has no real reproduction steps and no activity (apart from unrelated issues), I am going to close it. If you come across the issue from the first post in this thread, please contact our support team. If you are able to consistently reproduce errors, feel free to create a new bugreport.