Support » Plugin: WooCommerce » Fatal error upon plugin activation: table actionscheduler_actions doesn’t exist

  • Resolved Gabriel

    (@relearningonlinewoo)


    Hello everybody,

    I’m encountering a fatal error when trying to install either of WooCommerce and/or Action Scheduler plugins.
    The problem obviously is a missing db table. The strange thing is that for me it seems that the tables should have been created by either of the plugins during installation/activation.

    Research shows that there are several other plugins showing the same (or equal) problem. Though, no solution (such as deleting option values) worked for me.
    I’ve enabled debugging and checked the plugin files, but couldn’t find the needed created-statements for the missing tables. So I’m not able to add them manually.

    Stack trace

    Fatal error: Uncaught mysqli_sql_exception: Table '<DB-NAME>.<TABLE-PREFIX>actionscheduler_actions' doesn't exist in /<PATH-TO-WP>/wp-includes/wp-db.php:2056
    Stack trace:
    #0 /<PATH-TO-WP>/wp-includes/wp-db.php(2056): mysqli_query(Object(mysqli), 'DESCRIBE <TABLE-PREFIX>...') 
    #1 /<PATH-TO-WP>/wp-includes/wp-db.php(1945): wpdb->_do_query('DESCRIBE <TABLE-PREFIX>...') 
    #2 /<PATH-TO-WP>/wp-includes/wp-db.php(2695): wpdb->query('DESCRIBE <TABLE-PREFIX>...') 
    #3 /<PATH-TO-WP>/wp-admin/includes/upgrade.php(2749): wpdb->get_results('DESCRIBE <TABLE-PREFIX>...') 
    #4 /<PATH-TO-WP>/wp-content/plugins/woocommerce/packages/action-scheduler/classes/abstracts/ActionScheduler_Abstract_Schema.php(135): dbDelta(Array) 
    #5 /<PATH-TO-WP>/wp-content/plugins/woocommerce/packages/action-scheduler/classes/abstracts/ActionScheduler_Abstract_Schema.php(63): ActionScheduler_Abstract_Schema->update_table('actionscheduler...') 
    #6 /<PATH-TO-WP>/wp-content/plugins/woocommerce/packages/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php(36): ActionScheduler_Abstract_Schema->register_tables() 
    #7 /<PATH-TO-WP>/wp-content/plugins/woocommerce/packages/action-scheduler/classes/data-stores/ActionScheduler_HybridStore.php(57): ActionScheduler_DBStore->init() 
    #8 /<PATH-TO-WP>/wp-content/plugins/woocommerce/packages/action-scheduler/classes/abstracts/ActionScheduler.php(158): ActionScheduler_HybridStore->init() 
    #9 /<PATH-TO-WP>/wp-content/plugins/woocommerce/packages/action-scheduler/action-scheduler.php(55): ActionScheduler::init('/homepages/34/d...') 
    #10 /<PATH-TO-WP>/wp-content/plugins/woocommerce/packages/action-scheduler/action-scheduler.php(61): action_scheduler_initialize_3_dot_4_dot_0() 
    #11 /<PATH-TO-WP>/wp-content/plugins/woocommerce/includes/class-woocommerce.php(509): include_once('/homepages/34/d...') 
    #12 /<PATH-TO-WP>/wp-content/plugins/woocommerce/includes/class-woocommerce.php(172): WooCommerce->includes() 
    #13 /<PATH-TO-WP>/wp-content/plugins/woocommerce/includes/class-woocommerce.php(131): WooCommerce->__construct() 
    #14 /<PATH-TO-WP>/wp-content/plugins/woocommerce/woocommerce.php(47): WooCommerce::instance() 
    #15 /<PATH-TO-WP>/wp-content/plugins/woocommerce/woocommerce.php(62): WC() 
    #16 /<PATH-TO-WP>/wp-admin/includes/plugin.php(2286): include_once('/homepages/34/d...') 
    #17 /<PATH-TO-WP>/wp-admin/plugins.php(191): plugin_sandbox_scrape('woocommerce/woo...') 
    #18 {main} thrown in /<PATH-TO-WP>/wp-includes/wp-db.php on line 2056

    System details
    * PHP: 8.1
    * MySQL: 5.7
    * WordPress: 5.8.3
    * WooCommerce: 6.1.0
    * Action Scheduler 3.4.0

    Thanks a lot in advance!

    Cheers
    Gabriel

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Mirko P. woo-hc

    (@rainfallnixfig)

    Hi @relearningonlinewoo,

    Sorry to hear about the issue you’re facing. Are you able to reproduce this on a new install with only WooCommerce, the default Storefront theme active, and object caching disabled?

    It might be also that your PHP:8.1 is causing this so you may want to roll back to version 7.4. Make sure to save a full backup before doing changes.

    There was a discussion in Github that might be useful, and some users have proposed solutions: https://github.com/woocommerce/woocommerce/issues/25895

    Thanks.

    Thread Starter Gabriel

    (@relearningonlinewoo)

    Hi @rainfallnixfig,

    thanks for the quick reply. I found the Github thread (https://github.com/woocommerce/woocommerce/issues/25895) as well, but couldn’t see any clues on how to solve the issue.

    As I don’t have an environment ready to do a clean install, I tried the following “low hanging fruits” first:

    • switched back to PHP 7.4
    • disabled WP-cache with define('WP_CACHE', false);
    • deleted WooCommerce and Action Scheduler plugins via WP-plugin page
    • downloaded Action Scheduler via link of the comment (of the above mentioned thread), installed and activated it. No errors now.
    • installed and activated WooCommerce via WP-plugin listing (no manual download etc.). No errors now.

    So, thank you very much again for the support on this!

    Cheers
    Gabriel

    Plugin Support Margaret S. woo-hc

    (@margaretwporg)

    Hi @relearningonlinewoo

    Thanks for trying these out.

    As I don’t have an environment ready to do a clean install

    In order to reproduce the issue you can create a staging site with the WP Staging plugin, in case your hosting provider doesn’t offer an option already. That’ll allow you to perform tests without modifying your live site or impacting customers.

    Please let us know how it goes.

    Plugin Support Margaret S. woo-hc

    (@margaretwporg)

    We haven’t heard back from you in a while, so I’m marking this thread as resolved – we’ll be here if and/or when you are ready to continue.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.