Closed Djennez closed 4 years ago
Solution: catch the exception and show this warning: https://github.com/Yoast/wordpress-seo/pull/14903/files#diff-1e3f94f34573cfe3f34d72caa6013d0eR23
@IreneStr I don't think the notification is the appropriate one to show here.
That concerns us not being able to create tables. In this case we can create tables, we did successfully create the tables but someone removed them afterwards.
If we want to catch this we should show a different notice, probably one instructing people to install the test helper and reset their tables.
That said I'm not entirely sure this is worth fixing as I don't know how anyone would get into this situation without explicitly doing stuff that explicitly breaks your site.
Joost decided to not fix this, closing the issue.
I think this is an edge case, and I am not sure if it's worth fixing.
To reproduce:
Install Yoast 14.0-RC7
Make sure the site works as expected. Observe the table
wp_yoast_indexable
in the database exists.Delete this table
Navigate to the plugins-page, front-end or SEO page from your website, all will throw the following error:
Deactivate the plugin (either via sFTP or WP-CLI). Note the error is gone.
Re-activate the plugin, the error is back (so activation does not re-create the table)
Observable optional steps:
Remove the
yoast_migrations_free
entry fromwp_options
and reload a page with an error, the page should load fine, but any further reloads will throw the error again.Manually create a table
wp_yoast_indexable
in the database.Refresh a page with the error. The error should now read:
In comparison: manually remove
wp_yoast_seo_links
. No errors are shown and deactivating and activating the plugin again will restore this table.Complete stacktrace of the initial error: