• Resolved rafaelamador64

    (@rafaelamador64)


    Installation specifications:

    Server Version: Apache/2.4.46
    WordPress version: 5.6.2
    PHP Version: 7.4.15
    PHP memory limit: 256MB
    Theme: Astra 3.0.3
    Plugin: WooCommerce 5.0.0; 4.2.0 & 4.0.0

    ====================

    Details of the problem and error messages:

    When I install the Woocommerce plugin, the moment I activate it, it presents a major technical error and takes the entire site out of service.

    When starting in “recovery mode” of WordPress, it indicates that the problem is the plugin that could not load completely and presents the following error information:

    An error of type E_ERROR was caused in line 44 of the file /home/gceomx/subdoms/staging.gceo.mx/wp-content/plugins/woocommerce/packages/action-scheduler/classes/migration/ActionScheduler_DBStoreMigrator.php. Error message: Uncaught RuntimeException: Error saving action: Error saving action: Table ‘gceomx_wp629.wp_actionscheduler_actions’ doesn’t exist in /home/gceomx/subdoms/staging.gceo.mx/wp-content/plugins/woocommerce/packages/action-scheduler/classes/migration/ActionScheduler_DBStoreMigrator.php:44 Stack trace: #0 /home/gceomx/subdoms/staging.gceo.mx/wp-content/plugins/woocommerce/packages/action-scheduler/classes/data-stores/ActionScheduler_HybridStore.php(242): ActionScheduler_DBStoreMigrator->save_action(Object(ActionScheduler_Action), NULL) #1 /home/gceomx/subdoms/staging.gceo.mx/wp-content/plugins/woocommerce/packages/action-scheduler/classes/ActionScheduler_ActionFactory.php(177): ActionScheduler_HybridStore->save_action(Object(ActionScheduler_Action)) #2 /home/gceomx/subdoms/staging.gceo.mx/wp-content/plugins/woocommerce/packages/action-scheduler/classes/ActionScheduler_ActionFactory.php(84): ActionScheduler_ActionFactory->store(Object(ActionScheduler_Action)) #3 /home/gceomx/subdoms/staging.gceo.mx/wp-content/plugin

    Although this is a test site, the same is true for the production site; so I am sure that by solving the problem on this test site it would also be possible to solve it on the production site.

    ====================

    Actions carried out so far:

    The incompatibilities with the theme and plugins were verified, using the themes Twenty Twenty-One version: 1.1 & Storefront version: 3.5.0; and deactivating all the plugins.

    The problem continues to appear when installing any of the WooCommerce versions.

    Keeping the Twenty Twenty-One theme active and with all the plugins deactivated, the Action Scheduler plugin version 3.1.6 was installed (since in other entries they point out that it is a plugin that can solve the problem); and this latest plugin also has an equivalent critical bug.

    So far, the only solution I have found in the forums (from someone who experienced this problem) is to completely delete the site and do a new installation of the site with the latest versions (that is, a clean installation). But this solution is not feasible to implement.

    ====================

    Someone who could already solve this problem and who can guide me about it.

    Thanks and regards

Viewing 5 replies - 1 through 5 (of 5 total)
  • Rynald0s

    (@rynald0s)

    Automattic Happiness Engineer

    Hi @rafaelamador64!

    It looks like WooCommerce was not able to create some of the database tables that it needs to operate.

    If you are not able to access the “WooCommerce > Status > Tools” page to verify the base database tables, then please disable, and then immediately re-enable WooCommerce core to see if that rebuild the tables.

    Additionally, also make sure that the database user has the correct privileges. If you are unsure about this, you could also ask your host to verify.

    Cheers!

    Thread Starter rafaelamador64

    (@rafaelamador64)

    Hi @rynald0s, thanks for your answer.

    Fortunately I have already been able to solve the problem, and I was able to install WooCommerce on the test site and then on the production site.

    I comment to you, and to everyone who might be interested, the way I solved it (what I did could help someone).

    I already described the problem in detail in the original post, so I won’t go into it. I will only comment that, as the error message pointed out, a table was missing in the database (actually four tables were missing).

    For this, I used the database manager included in cPanel, which allowed me to view and manipulate the databases and their tables.

    It was necessary to create the tables prefix_actionscheduler_actions, prefix_actionscheduler_claims, prefix_actionscheduler_groups & prefix_actionscheduler_logs in the WordPress installation database (tables were created blank, without records).

    The problem was to replicate the structures and fields of each table, so I first did a fresh install of WP on a separate subdomain (I’m going to call it “dummy”).

    In the new installation database, there was no table named prefix_actionscheduler_actions.

    So I proceeded to install a delayed version of WooCommerce and update it.

    I downloaded woocommerce.3.4.6.zip and installed it manually in dummy, then I installed woocommerce.4.0.0.zip as an upgrade from the previous version; this asked to update the WooCommerce tables, after which the “prefix_actionscheduler_*” tables already appeared in the dummy database.

    I checked the structure of the tables and duplicated it as exactly as possible in the database of the staging facility (so as not to touch the production site); for this I created each of the tables with the corresponding prefix.

    So I proceeded to do the same as in dummy, install woocommerce.3.4.6.zip manually and then update it to version 4.0.0. As the required tables already existed, the process could be carried out without major problems. And the same for updating to version 5.0.0.

    The definitive solution consisted in creating a new staging of the production site; create the 4 missing tables in the corresponding database; and directly install the latest version of WooCommerce from the WordPress.org repository.

    This way the WooCommerce installation ran smoothly, exactly like any new installation (including the installation tutorial).

    Finally I simply put the staging into production and the issue resolved.

    Greetings and thanks to those interested.

    Had same problem. What worked for me was to first install Action Scheduler 3.1.4 as described here: https://github.com/woocommerce/woocommerce/issues/25895#issuecomment-742461254

    Thread Starter rafaelamador64

    (@rafaelamador64)

    Thanks @slacle for your comment and contribution to this issue.

    I see that it is very common and that I have not been the only one who has experienced it.

    I have been reviewing your solution, and I think it would work (since I already fixed it, I do not have the production site with problems, nor do I want to have it again, so I cannot test it).

    I also tried it with the action-scheduler-master plugin, but with version 3.1.6, and the behavior was the same as with WooCommerce, so I discarded that path. The idea of ​​starting with version 3.1.4, so that it creates the missing tables is similar to what the document https://rankmath.com/kb/fatal-error-after-1-0-49 indicates -update / (although it is a different plugin, the error is due to the lack of the same tables) the advantage is that they developed a solution that directly checks and repairs the missing tables of _actionscheduler_ with a dedicated plugin (I wish I had known before of this solution, and I wouldn’t have spent that much time fixing it).

    Thanks again for your comment.

    Thread Starter rafaelamador64

    (@rafaelamador64)

    Sorry, when copying and pasting (with the translator), the document link was poorly integrated

    The correct one is: https://rankmath.com/kb/fatal-error-after-1-0-49-update

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

The topic ‘WooCommerce: critical error in plugin activation’ is closed to new replies.