Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught RuntimeException #1224

Closed
jeckman opened this issue Dec 11, 2024 · 5 comments
Closed

Uncaught RuntimeException #1224

jeckman opened this issue Dec 11, 2024 · 5 comments
Labels
type: support request Issues submitted that are not bugs or enhancements but support requests (both dev and non-dev).

Comments

@jeckman
Copy link

jeckman commented Dec 11, 2024

Also opened a thread in all-in-one-seo-pack support forum, but I think at least the exception catching ought to be happening in this action scheduler?

PHP Fatal error: Uncaught RuntimeException: Error saving action: Error saving action: Unknown column 'priority' in 'field list' in /wp-content/plugins/all-in-one-seo-pack/vendor/woocommerce/action-scheduler/classes/migration/ActionScheduler_DBStoreMigrator.php:44

Not sure what version of action-scheduler is included in AIOSEO but the AIOSEO version is 4.7.6

@jeckman
Copy link
Author

jeckman commented Dec 11, 2024

FYI this is on a site that does not run woocommerce but I don't know much about the action scheduler so let me know if this is the wrong place to share this

@barryhughes
Copy link
Member

Hi @jeckman. This sounds like a problem in which the priority column is missing from the wp_actionscheduler_actions table. Are you comfortable working with SQL, and do you have access to a tool such as phpMyAdmin? If so, you might try something like this:

alter table wp_actionscheduler_actions
    add priority tinyint default 10 not null;

Or, if you have access to WP CLI, you could try running:

wp action-scheduler fix-schema

The latter may be easier/safer, but it also depends on the WP database user having the necessary privileges to make the required change, which may not be the case. Normally this isn't required but, again, it seems like it was not possible for Action Scheduler to perform the necessary update itself.

@barryhughes barryhughes added the type: support request Issues submitted that are not bugs or enhancements but support requests (both dev and non-dev). label Dec 11, 2024
@jeckman
Copy link
Author

jeckman commented Dec 12, 2024

Thanks Barry - will do.

I guess my question was even if a table ends up without the right columns, shouldn't an exception be thrown and caught?

@jeckman
Copy link
Author

jeckman commented Dec 12, 2024

Adding the column worked

@jeckman jeckman closed this as completed Dec 12, 2024
@barryhughes
Copy link
Member

In this case, that probably would make sense, yes, and we have a separate issue that outlines the need to review how these situations are handled:

#1059

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: support request Issues submitted that are not bugs or enhancements but support requests (both dev and non-dev).
Projects
None yet
Development

No branches or pull requests

2 participants