Getting error on activating woocommerce
-
I am developing a website in localhost, when I attempt to activate woocommerce plugin i receive below error:
Fatal error: Uncaught exception ‘RuntimeException’ with message ‘Error saving action: Unable to save action.’ in \wp-content\plugins\woocommerce\includes\libraries\action-scheduler\classes\ActionScheduler_wpPostStore.php on line 27
( ! ) RuntimeException: Error saving action: Unable to save action. in \wp-content\plugins\woocommerce\includes\libraries\action-scheduler\classes\ActionScheduler_wpPostStore.php on line 27
Quick help will be appreciated.
-
Hey there!
It looks like there’s an issue with the server environment and being able to queue up jobs that WooCommerce needs to run using the Action Scheduler.
Are you able to turn on wp_debug and see if that allows you to get it active and logs any other errors?
Hello Andrew,
the log file states
2019-04-21T16:05:18+00:00 CRITICAL Uncaught exception ‘RuntimeException’ with message ‘Error saving action: Unable to save action.’ in \wp-content\plugins\woocommerce\includes\libraries\action-scheduler\classes\ActionScheduler_wpPostStore.php:27
Stack trace:
#0 \wp-content\plugins\woocommerce\includes\libraries\action-scheduler\classes\ActionScheduler_ActionFactory.php(109): ActionScheduler_wpPostStore->save_action(Object(ActionScheduler_Action))
#1 \wp-content\plugins\woocommerce\includes\libraries\action-scheduler\classes\ActionScheduler_ActionFactory.php(78): ActionScheduler_ActionFactory->store(Object(ActionScheduler_Action))
#2 \wp-content\plugins\woocommerce\includes\libraries\action-scheduler\functions.php(33): ActionScheduler_ActionFactory->recurring(‘woocommerce_upd…’, Array, 1555862718, 604800, ”)
#3 \wp-content\plugins\woocommerce\includes\queue\class-wc-action-queue.php(58): as_schedule_recurring_action(1555862718, 604800, ‘woocommerce_upd…’, Array in \wp-content\plugins\woocommerce\includes\libraries\action-scheduler\classes\ActionScheduler_wpPostStore.php on line 272019-04-21T16:05:24+00:00 CRITICAL Uncaught exception ‘RuntimeException’ with message ‘Error saving action: Unable to save action.’ in \wp-content\plugins\woocommerce\includes\libraries\action-scheduler\classes\ActionScheduler_wpPostStore.php:27
Stack trace:
#0 \wp-content\plugins\woocommerce\includes\libraries\action-scheduler\classes\ActionScheduler_ActionFactory.php(109): ActionScheduler_wpPostStore->save_action(Object(ActionScheduler_Action))
#1 \wp-content\plugins\woocommerce\includes\libraries\action-scheduler\classes\ActionScheduler_ActionFactory.php(78): ActionScheduler_ActionFactory->store(Object(ActionScheduler_Action))Thank you. ??
Hey @pokemon9000
Did you get any further with this? I know that there has been an update to the Action Scheduler – if you haven’t gotten any progress with this, can you install the latest WooCommerce version on the site?
Thanks,
Hey @pokemon9000
We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.
Hi
I am really struggling. I think it is a similar error to the above. Cant activate Woocommerce. Have tried to deactivate, delete, reinstall, reactivate. Have removed all plugin and kept just Woocommerce – didn’t work. Have tried changing the theme to Storefront – also didn’t work. have contacted my site host – they told me to connect with the plugin author. I am really lost. My version is 3.7.0; PHP 7.1.3
Error message:-Fatal error: Uncaught RuntimeException: Error saving action: Unable to save action. in /home/fydde019/public_html/wp-content/plugins/woocommerce/includes/libraries/action-scheduler/classes/ActionScheduler_wpPostStore.php:33 Stack trace: #0 /home/fydde019/public_html/wp-content/plugins/woocommerce/includes/libraries/action-scheduler/classes/ActionScheduler_ActionFactory.php(109): ActionScheduler_wpPostStore->save_action(Object(ActionScheduler_Action)) #1 /home/fydde019/public_html/wp-content/plugins/woocommerce/includes/libraries/action-scheduler/classes/ActionScheduler_ActionFactory.php(59): ActionScheduler_ActionFactory->store(Object(ActionScheduler_Action)) #2 /home/fydde019/public_html/wp-content/plugins/woocommerce/includes/libraries/action-scheduler/functions.php(18): ActionScheduler_ActionFactory->single(‘woocommerce_upd…’, Array, 1567069059, ”) #3 /home/fydde019/public_html/wp-content/plugins/woocommerce/includes/queue/class-wc-action-queue.php(44): as_schedule_single_action(1567069059, ‘woocommerce_upd…’, Arr in /home/fydde019/public_html/wp-content/plugins/woocommerce/includes/libraries/action-scheduler/classes/ActionScheduler_wpPostStore.php on line 33
I’m getting the same error as NA above! The shop was set up a couple of months ago, but the problem started last week. According to the Plugins page, WooCommerce is activated, but whenever I click on “Orders”, “Products”, or the “Update WooCommerce Database” button, it gives me the following error.
Fatal error: Uncaught RuntimeException: Error saving action: Unable to save action. in /home/havenwoo/public_html/havenwoodhouse.com/wp-content/plugins/woocommerce/includes/libraries/action-scheduler/classes/ActionScheduler_wpPostStore.php:33 Stack trace: #0 /home/havenwoo/public_html/havenwoodhouse.com/wp-content/plugins/woocommerce/includes/libraries/action-scheduler/classes/ActionScheduler_ActionFactory.php(109): ActionScheduler_wpPostStore->save_action(Object(ActionScheduler_Action)) #1 /home/havenwoo/public_html/havenwoodhouse.com/wp-content/plugins/woocommerce/includes/libraries/action-scheduler/classes/ActionScheduler_ActionFactory.php(59): ActionScheduler_ActionFactory->store(Object(ActionScheduler_Action)) #2 /home/havenwoo/public_html/havenwoodhouse.com/wp-content/plugins/woocommerce/includes/libraries/action-scheduler/functions.php(18): ActionScheduler_ActionFactory->single(‘woocommerce_run…’, Array, 1569467792, ‘woocommerce-db-…’) #3 /home/havenwoo/public_html/havenwoodhouse.com/wp-content/plugins/woocomme in /home/havenwoo/public_html/havenwoodhouse.com/wp-content/plugins/woocommerce/includes/libraries/action-scheduler/classes/ActionScheduler_wpPostStore.php on line 33
Here is a video showing more details on the situation:
https://www.loom.com/share/85571fd02c3c49dca9f1519008ca4915This is the system status report
### WordPress Environment ### WordPress address (URL): https://havenwoodhouse.com Site address (URL): https://havenwoodhouse.com WC Version: 3.7.0 REST API Version: ? 1.0.2 Log Directory Writable: ? WP Version: 5.2.3 WP Multisite: – WP Memory Limit: 768 MB WP Debug Mode: – WP Cron: ? Language: en_US External object cache: – ### Server Environment ### Server Info: Apache PHP Version: 7.1.30 - We recommend using PHP version 7.2 or above for greater performance and security. How to update your PHP version PHP Post Max Size: 128 MB PHP Time Limit: 120 PHP Max Input Vars: 3000 cURL Version: 7.59.0 OpenSSL/1.0.2r SUHOSIN Installed: – MySQL Version: 5.6.40-84.0-log Max Upload Size: 128 MB Default Timezone is UTC: ? fsockopen/cURL: ? SoapClient: ? DOMDocument: ? GZip: ? Multibyte String: ? Remote Post: ? Remote Get: ? ### Database ### WC Database Version: 3.6.5 WC Database Prefix: wptq_ MaxMind GeoIP Database: ? Total Database Size: 15.85MB Database Data Size: 13.70MB Database Index Size: 2.15MB wptq_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wptq_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wptq_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wptq_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wptq_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wptq_woocommerce_order_itemmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wptq_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wptq_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wptq_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wptq_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wptq_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wptq_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wptq_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wptq_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wptq_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wptq_comments: Data: 0.34MB + Index: 0.47MB + Engine InnoDB wptq_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wptq_options: Data: 2.05MB + Index: 0.05MB + Engine InnoDB wptq_podsrel: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wptq_postmeta: Data: 9.25MB + Index: 0.33MB + Engine InnoDB wptq_posts: Data: 1.36MB + Index: 0.39MB + Engine InnoDB wptq_smush_dir_images: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wptq_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wptq_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wptq_term_relationships: Data: 0.08MB + Index: 0.05MB + Engine InnoDB wptq_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wptq_usermeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wptq_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wptq_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wptq_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wptq_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wptq_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wptq_yoast_seo_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wptq_yoast_seo_meta: Data: 0.06MB + Index: 0.00MB + Engine InnoDB ### Security ### Secure connection (HTTPS): ? Hide errors from visitors: ? ### Active Plugins (11) ### BackWPup: by Inpsyde GmbH – 3.6.10 Beaver Builder Plugin (Standard Version): by The Beaver Builder Team – 2.2.5.3 Beaver Themer: by The Beaver Builder Team – 1.2.4.2 GP Premium: by Tom Usborne – 1.8.3 Pods Beaver Themer Add-On: by Quasel Pods Framework Team – 1.3.2 Pods - Custom Content Types and Fields: by Pods Framework Team – 2.7.15 SG Optimizer: by SiteGround – 5.3.1 WooCommerce: by Automattic – 3.7.0 Yoast SEO: by Team Yoast – 12.1 Smush: by WPMU DEV – 3.2.4 WPForms Lite: by WPForms – 1.5.5.1 ### Inactive Plugins (3) ### Google Analytics for WordPress by MonsterInsights: by MonsterInsights – 7.8.2 WooCommerce PayPal Powered by Braintree Gateway: by WooCommerce – 2.2.7 WooCommerce Square: by WooCommerce – 2.0.4 ### Settings ### API Enabled: – Force SSL: ? Currency: USD ($) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) variable (variable) Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5) Connected to WooCommerce.com: – ### WC Pages ### Shop base: #130 - /shop-page/ Cart: #39 - /cart/ Checkout: #40 - /checkout/ My account: #41 - /my-account/ Terms and conditions: ? Page not set ### Theme ### Name: GeneratePress Version: 2.3.2 Author URL: https://tomusborne.com Child Theme: ? – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme WooCommerce Support: ? ### Templates ### Overrides: – ### Action Scheduler ### Complete: 742 Oldest: 2019-08-26 04:37:46 +0000 Newest: 2019-09-23 16:24:36 +0000 Pending: 0 Oldest: – Newest: – Canceled: 0 Oldest: – Newest: – In-progress: 0 Oldest: – Newest: – Failed: 0 Oldest: – Newest: –
-
This reply was modified 5 years, 5 months ago by
saraobando.
-
This reply was modified 5 years, 5 months ago by
saraobando.
-
This reply was modified 5 years, 5 months ago by
saraobando.
I am also getting a similar message, after an update, everything was working fine this message appeared after update every time I click on woocommerce related tabs in WordPress dashboard. How do we fix this problem?
Fatal error: Uncaught RuntimeException: Error saving action: Unable to save action. in /home/owcomputersco/public_html/wp-content/plugins/woocommerce/includes/libraries/action-scheduler/classes/ActionScheduler_wpPostStore.php:33 Stack trace: #0 /home/owcomputersco/public_html/wp-content/plugins/woocommerce/includes/libraries/action-scheduler/classes/ActionScheduler_ActionFactory.php(109): ActionScheduler_wpPostStore->save_action(Object(ActionScheduler_Action)) #1 /home/owcomputersco/public_html/wp-content/plugins/woocommerce/includes/libraries/action-scheduler/classes/ActionScheduler_ActionFactory.php(59): ActionScheduler_ActionFactory->store(Object(ActionScheduler_Action)) #2 /home/owcomputersco/public_html/wp-content/plugins/woocommerce/includes/libraries/action-scheduler/functions.php(18): ActionScheduler_ActionFactory->single(‘woocommerce_upd…’, Array, 1573218944, ”) #3 /home/owcomputersco/public_html/wp-content/plugins/woocommerce/includes/queue/class-wc-action-queue.php(44): as_schedule_single_action(1573218944, in /home/owcomputersco/public_html/wp-content/plugins/woocommerce/includes/libraries/action-scheduler/classes/ActionScheduler_wpPostStore.php on line 33
The site is experiencing technical difficulties. Please check your site admin email inbox for instructions.-
This reply was modified 5 years, 4 months ago by
creatorsco.
Just installed WooCommerce on a fresh site and I’m getting the same error. I’m going to try an old version because with the recent activity of this post it looks like you guys either haven’t fixed this or reintroduced it in the latest version.
This issue is caused by actions created using the Action Scheduler being attached to a specific admin user. If that admin user is removed and **Delete all content** was selected, the actions scheduler will cause the pages it loads on to fail.
In WooCommerce 4.0 we will replace the current action scheduler with version 3.0 which does not depend upon the post table. until then, you can use Code Snippets and add the following snippet:
add_filter( 'wp_insert_post_data', function( $data ) { global $wpdb; if ( 0 === $data['post_author'] && 'scheduled-action' == $data['post_type'] ) { $data['post_author'] = $wpdb->get_var( "SELECT ID FROM {$wpdb->users} ORDER BY ID ASC LIMIT 1" ); } return $data; }, 20 );
-
This reply was modified 5 years, 5 months ago by
- The topic ‘Getting error on activating woocommerce’ is closed to new replies.