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

PHP Warning: Warning: Undefined property: stdClass::$priority in [...]/libraries/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php on line 379 #958

Closed
strarsis opened this issue Jun 6, 2023 · 3 comments

Comments

@strarsis
Copy link

strarsis commented Jun 6, 2023

PHP 8 reports a PHP warning with current action-scheduler:

Warning: Undefined property: stdClass::$priority in [...]/libraries/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php on line 379
@barryhughes
Copy link
Member

barryhughes commented Jun 6, 2023

Hi @strarsis,

It's possible this is happening because your database structure was not updated during the most recent Action Scheduler update. To verify this, would you be comfortable running the following query?

-- Update the table prefix ("wp_") as needed.
DESCRIBE wp_actionscheduler_actions

You should see several rows in the response. Is this one ("priority") among them?

Field Type Null Default
priority tinyint unsigned NO 10

If the priority field is not present, and if you have access to WP CLI, you might try running the following command to fix things:

wp action-scheduler fix-schema

@gencmedya
Copy link

gencmedya commented Jun 11, 2023

run the below query, please take a backup before running.

ALTER TABLE `wp_actionscheduler_actions` ADD `priority` TINYINT(3) UNSIGNED NOT NULL DEFAULT '10' AFTER `extended_args`;

@barryhughes
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants