woocomeerce plugin Uncaught RuntimeException: Error saving action: Duplicate entry '0' for key 'PRIMARY'

 2023-04-28 15:48:45.639391 [NOTICE] [3001088] [162.158.111.228:57126:HTTP2-1#cloudcertification.io] [STDERR] PHP Fatal error:  Uncaught RuntimeException: Error saving action: Duplicate entry '0' for key 'PRIMARY' in /home/cloudcertification.io/public_html/wp-content/plugins/woocommerce/packages/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php:118



wp_actionscheduler_actions


ALTER TABLE wp_actionscheduler_actions CHANGE action_id action_id  BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT;



Thank you for letting us know that this database error was caused by the wp_actionscheduler_actions database table having the action_id set as primary ID and missing the auto-increment.

For other folks out there facing the same database error – the database can be accessed via a plugin like phpMyAdmin but please note that it is very easy to bring the whole site down when working on a database directly. So in such case, I’d suggest making sure you have a recent site backup and perhaps even testing changes on a database of a staging site first. If you don’t feel comfortable working with the database directly – you may want to consider getting a developer to fix this for you.

Comments

Popular posts from this blog

how to install internet download manger in linux

cpanel exam CPSP Answers

How to install zimbra collaboration suite 8.8.11 on CentOS 7