• Resolved esleight

    (@esleight)


    When activating The Events Calendar plugin, I receive a fatal error (errors below). I tested for a theme conflict (using a standard theme such as Twenty Twenty Two) and it also gives a fatal error. I’m running WP 6.2.2 and PHP 8.0. Any help is appreciated!

    WordPress database error: [Unknown column ‘priority’ in ‘field list’] INSERT INTO wp_f0c6ap3b37_actionscheduler_actions ( hook, status, scheduled_date_gmt, scheduled_date_local, schedule, group_id, priority, args ) SELECT ‘action_scheduler/migration_hook’, ‘pending’, ‘2023-08-19 18:07:06’, ‘2023-08-19 14:07:06’, ‘O:30:\”ActionScheduler_SimpleSchedule\”:2:{s:22: \”\0*\0scheduled_timestamp\”;i:1692468426;s:41:\”\0ActionScheduler_SimpleSchedule \0timestamp\”;i:1692468426;}’, 1, 10, ‘[]’ FROM DUAL WHERE ( SELECT NULL FROM DUAL ) IS NULL

    Fatal error: Uncaught RuntimeException: Error saving action: Error saving action: Unknown column ‘priority’ in ‘field list’ in /var/www/wp-content/plugins/the-events-calendar/vendor/woocommerce/action-scheduler/classes/migration/ActionScheduler_DBStoreMigrator.php:44

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support tristan083

    (@tristan083)

    Hi @esleight ,

    Thank you for reaching out, and I’m sorry to learn of the difficulties.

    The actionsscheduler_actions database table is a default WordPress database table. Have you checked this table in your database to see if the ‘priority’ column does indeed exist (or not exist)?

    Thread Starter esleight

    (@esleight)

    The column does not exist currently. I’m not sure if it existed in the past, but it doesn’t exist in the current version that we have (6.2.2). In order to be able to activate the plug-in, I added a line of code to the one of the plug-in PHP files (ActionScheduler_DBStore.php). It simply removes that column prior to the INSERT INTO call to the the database. I’m not sure why it would be trying to write to a column that doesn’t exist. This particular column (‘priority’) is mentioned in several places in the code. Maybe it was deprecated?

    Plugin Support WilloftheD

    (@abzlevelup)

    Hi @esleight, thanks for providing more information. Let me confirm this with our devs and see if that’s the case with this one. I wasn’t able to replicate and priority column isn’t there for me.

    While waiting can you try reinstalling the plugin and see if that makes a difference?

    I’d get back to you as soon as I hear from our team.

    Thank you,
    Abz

    Thread Starter esleight

    (@esleight)

    Thanks for getting back to me. I can try to reinstall a little later. I did download the most recent version of the plugin and I still see the “priority” column references in the code… if it helps this is where it is being set:

    $data = array(
    ‘hook’ => $action->get_hook(),
    ‘status’ => ( $action->is_finished() ? self::STATUS_COMPLETE : self::STATUS_PENDING ),
    ‘scheduled_date_gmt’ => $this->get_scheduled_date_string( $action, $date ),
    ‘scheduled_date_local’ => $this->get_scheduled_date_string_local( $action, $date ),
    ‘schedule’ => serialize( $action->get_schedule() ), // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.serialize_serialize
    ‘group_id’ => current( $this->get_group_ids( $action->get_group() ) ),
    ‘priority’ => $action->get_priority(),
    );

    And this is where it blows up on me:

    $insert_sql = $this->build_insert_sql( $data, $unique );

    I’ll try to reinstall later after hours.

    Thanks!!

    Plugin Support WilloftheD

    (@abzlevelup)

    Hi @esleight, thanks for providing more information and I’d share this with the team as well.

    I suspect there’s a conflict that’s causing the issue here. It would be good to test for conflicts. Could you follow the following steps?

    1. Deactivate all other plugins except for The Events Calendar Plugins.
    2. Switching to the Default theme.

    Please let us know how it goes, and share more information and findings.

    Best,
    Abz

    Plugin Support WilloftheD

    (@abzlevelup)

    Hi @esleight, one of our devs got back to me recommending that you try disabling all plugins and then activate The Events Calendar plugin first as this would trigger our version of the Action Scheduler to activate and try updating the database, then all other plugins.

    Please do keep us posted.

    Thread Starter esleight

    (@esleight)

    Activating it first seems to work! I did it on our staging server and it looks good. Thanks so much for the advice!

    Plugin Support WilloftheD

    (@abzlevelup)

    Hi @esleight, thanks for confirming and trying things out!

    If you have some time to review, that would be amazing!
    https://ww.wp.xz.cn/support/plugin/the-events-calendar/reviews/

    I’d be closing this thread, and please do not hesitate to bump a new thread on our way. This is for us to track down topics/issues efficiently and for us to follow the WordPress Forum Guidelines.

    Have a great week ahead!

    Best,
    Abz

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘WordPress database error: [Unknown column ‘priority’ in ‘field list’]’ is closed to new replies.