• Resolved danielx147

    (@danielx147)


    Fatal error: Uncaught RuntimeException: Error saving action: Error saving action: Table ‘DBname.wp_actionscheduler_actions’ doesn’t exist in /wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/ActionScheduler_DBStoreMigrator.php:44 Stack trace: #0 wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_HybridStore.php(242): ActionScheduler_DBStoreMigrator->save_action(Object(ActionScheduler_Action), NULL) #1 /wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_ActionFactory.php(177): ActionScheduler_HybridStore->save_action(Object(ActionScheduler_Action)) #2 wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_ActionFactory.php(84): ActionScheduler_ActionFactory in wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/ActionScheduler_DBStoreMigrator.php on line 44

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Gregor Capuder

    (@capuderg)

    Hi,

    @thiagodiaz thank you for posting the relevant links.

    @danielx147 please read through the forum posts that Thiago posted above and try the suggested steps.

    @thiagodiaz could you please contact your hosting support and ask them if the database user used for your WP site has permissions to create database tables. That might be the issue why the tables are not creating. Or maybe they have some SQL/DB logs that will point to the reason why the table creation is failing.

    Please share any findings here with us.

    Take care!

    Plugin Author Gregor Capuder

    (@capuderg)

    Hi @danielx147,

    which steps/methods did you try out?

    I reproduced this issue by deleting the DB tables you are missing on my test WP site and got the same error:

    Fatal error: Uncaught exception ‘RuntimeException’ with message ‘Error saving action: Error saving action: Table ‘***_wp.wp**_actionscheduler_actions’ doesn’t exist’ in…

    Then I:
    1. deactivated the WP Mail SMTP plugin by renaming its folder in .../wp-content/plugins/ from wp-mail-smtp to old-wp-mail-smtp via the “File Manager” in my web hosting cPanel,
    2. now my WP dashboard is working again and I installed and activated the Action Scheduler plugin: https://github.com/woocommerce/action-scheduler/archive/3.1.4.zip,
    3. in the WP dashboard go to “Tools -> Scheduled Actions” and you should see these notices: https://a.supportally.com/DmHjow
    4. wait a few seconds and then reload the page
    5. if the tables were created successfully you will not see the notices from the above screenshot, so you are good to proceed with the next step,
    6. rename the plugin folder from old-wp-mail-smtp back to wp-mail-smtp,
    7. in you WP dashboard activate the WP Mail SMTP plugin, it should now work correctly,
    8 deactivate and delete the “Action Scheduler” plugin

    This is how I was able to fix the missing DB tables issue.

    If the DB tables were not created in the 5th step, then there are some server/database configuration issues preventing your WP site to create these DB tables. Please contact your hosting company and ask them to check database logs to see what is causing this issue. If you find out what is causing it, please share it with other here, since it might help them out as well.

    Take care!

    Thread Starter danielx147

    (@danielx147)

    Thanks.
    Its worked !

    Hi @capuderg I happen to have the same problem.

    I tried following your steps but got stuck on step 3 and 4. I reloaded the page but still shows the same message all over.

    Plugin Author Gregor Capuder

    (@capuderg)

    Hi @marbaque,

    if the tables are not re-creating for you, then please visit /wp-admin/options.php on your WP site. Search for “action_scheduler” and let me know which results you get and what values do they have.

    If you don’t get any search results, then please contact your hosting support and ask them to investigate the MySQL logs, why the table creation of action scheduler are failing.

    Let us know what they find, since it might be useful for others having the same issue.

    Take care!

    Hi,

    This solution was supposed to be provided by the plugin author. You can manually execute this query to create the table to fix this issue

    make sure to change the table name (prefix)

    CREATE TABLE MU2_actionscheduler_actions (
    action_id bigint(20) unsigned NOT NULL auto_increment,
    hook varchar(191) NOT NULL,
    status varchar(20) NOT NULL,
    scheduled_date_gmt datetime NOT NULL default '0000-00-00 00:00:00',
    scheduled_date_local datetime NOT NULL default '0000-00-00 00:00:00',
    args varchar(191),
    schedule longtext,
    group_id bigint(20) unsigned NOT NULL default '0',
    attempts int(11) NOT NULL default '0',
    last_attempt_gmt datetime NOT NULL default '0000-00-00 00:00:00',
    last_attempt_local datetime NOT NULL default '0000-00-00 00:00:00',
    claim_id bigint(20) unsigned NOT NULL default '0',
    extended_args varchar(8000) DEFAULT NULL,
    PRIMARY KEY  (action_id),
    KEY hook (hook(191)),
    KEY status (status),
    KEY scheduled_date_gmt (scheduled_date_gmt),
    KEY args (args(191)),
    KEY group_id (group_id),
    KEY last_attempt_gmt (last_attempt_gmt),
    KEY claim_id (claim_id)
    ) 
    • This reply was modified 4 years, 2 months ago by manees.
    • This reply was modified 4 years, 2 months ago by manees.

    @capuderg The thing is, the hosting provider is my institution IT department. For security reasons, users in the database are not granted Drop permissions. So, the solution was to temporarily grant all privileges and do the update, then go back to previous privileges.

    Plugin Author Gregor Capuder

    (@capuderg)

    Hi @manees and @marbaque,

    thanks for sharing the DB table query. The DB query can change in the future plugin versions and adding it manually could cause some other unexpected issues. The plugin itself should be able to create DB tables, since that’s a normal thing for a WP site to do.

    @marbaque thanks for sharing your solution. Maybe other users experiencing this issue will resolve it in the same way.

    Take care!

    The plugin will not create the tables if the following options are found in wp_options table: schema-ActionScheduler_StoreSchema and schema-ActionScheduler_LoggerSchema.

    No amount of asking your hosting provider will help you there.

    Deleting the two options and activating the plugin worked for me.

    Thanks @andho ! This did the trick for me after spending a few hours on this issue.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Last update crush my site’ is closed to new replies.