• Resolved skdevs

    (@skdevs)


    Woocommerce plugin failed to load and we are unable to login to dashboard

    WordPress database error: [Duplicate entry ‘0’ for key ‘wphe_actionscheduler_actions.PRIMARY’]
    INSERT INTO wphe_actionscheduler_actions ( hook, status, scheduled_date_gmt, scheduled_date_local, schedule, group_id, priority, args ) SELECT 'woocommerce_cleanup_draft_orders', 'pending', '2023-09-06 07:34:39', '2023-09-06 07:34:39', 'O:32:\"ActionScheduler_IntervalSchedule\":5:{s:22:\"\0*\0scheduled_timestamp\";i:1693985679;s:18:\"\0*\0first_timestamp\";i:1693985679;s:13:\"\0*\0recurrence\";i:86400;s:49:\"\0ActionScheduler_IntervalSchedule\0start_timestamp\";i:1693985679;s:53:\"\0ActionScheduler_IntervalSchedule\0interval_in_seconds\";i:86400;}', 5, 10, '[]' FROM DUAL WHERE ( SELECT NULL FROM DUAL ) IS NULL
    Fatal error: Uncaught RuntimeException: Error saving action: Duplicate entry ‘0’ for key ‘wphe_actionscheduler_actions.PRIMARY’ in /home/bioty/public_html/wp-content/plugins/woocommerce/packages/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php:126 Stack trace: #0 /home/bioty/public_html/wp-content/plugins/woocommerce/packages/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php(69): ActionScheduler_DBStore->save_action_to_db() #1 /home/bioty/public_html/wp-content/plugins/woocommerce/packages/action-scheduler/classes/ActionScheduler_ActionFactory.php(327): ActionScheduler_DBStore->save_action() #2 /home/bioty/public_html/wp-content/plugins/woocommerce/packages/action-scheduler/classes/ActionScheduler_ActionFactory.php(315): ActionScheduler_ActionFactory->store() #3 /home/bioty/public_html/wp-content/plugins/woocommerce/packages/action-scheduler/functions.php(175): ActionScheduler_ActionFactory->create() #4 /home/bioty/public_html/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/Domain/Services/DraftOrders.php(65): as_schedule_recurring_action() #5 /home/bioty/public_html/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/Domain/Services/DraftOrders.php(57): Automattic\WooCommerce\Blocks\Domain\Services\DraftOrders->maybe_create_cronjobs() #6 /home/bioty/public_html/wp-includes/class-wp-hook.php(308): Automattic\WooCommerce\Blocks\Domain\Services\DraftOrders->install() #7 /home/bioty/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() #8 /home/bioty/public_html/wp-includes/plugin.php(517): WP_Hook->do_action() #9 /home/bioty/public_html/wp-admin/admin.php(175): do_action() #10 /home/bioty/public_html/wp-admin/index.php(10): require_once(‘/home/bioty/pub…’) #11 {main} thrown in /home/bioty/public_html/wp-content/plugins/woocommerce/packages/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php on line 126

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter skdevs

    (@skdevs)

    bumping this topic – anyone able to assist?

    Hi @skdevs

    Action Scheduler – Duplicate entry ‘0’ error
    Woocommerce plugin failed to load and we are unable to login to dashboard.

    From what I understand, you’re running into a database error that’s stopping the WooCommerce plugin from loading and blocking your dashboard access. The error message hints at a duplicate entry ‘0’ for key ‘wphe_actionscheduler_actions.PRIMARY’. This typically indicates some corruption in your database, possibly with multiple actions having the same ID of 0.

    Did you recently move your website or restore it from a backup? If so, that could be the source of the problem. You might want to think about running the migration or database import again to fix the issue.

    If you haven’t made any recent changes like that, the problem could be that your database’s auto-increment function isn’t working properly. If that’s the case, it’d be a good idea to contact your hosting provider and ask them to take a look at your database.

    I hope this helps you on your way to resolving the issue. Feel free to reach out if you need more assistance.

    Thread Starter skdevs

    (@skdevs)

    yes we restored backup as we lost some design and now we are facing this issue can you tell me more what o do in this scenario to get back our access to dashboard. It was working till las Saturday but suddenly this happened

    • This reply was modified 2 years, 7 months ago by skdevs.

    Hi @skdevs

    yes we restored backup as we lost some design and now we are facing this issue can you tell me more what o do in this scenario to get back our access to dashboard. It was working till las Saturday but suddenly this happened

    Thank you for your response and for providing additional context about the issue you’re facing.

    Considering that you recently restored your website from a backup, it seems likely that the restoration process might have led to some inconsistency in your database, causing the ‘Duplicate entry ‘0’ for key ‘wphe_actionscheduler_actions.PRIMARY‘ error.

    Here are the steps you should follow to resolve this issue:

    1. Backup your current database: Before you make any changes, we strongly recommend that you create a backup of your full site and database. This is a crucial step to ensure that in case anything goes wrong, you can easily restore your site to its previous, functioning state.
    2. Check your database: Use a tool like phpMyAdmin, which is commonly available in hosting control panels, to access your database. Look for the ‘wphe_actionscheduler_actions‘ table. Check the ‘id‘ column to make sure it is set to auto-increment. If it’s not, change it to auto-increment.
    3. Remove duplicate entries: If there are any duplicate entries in the ‘id‘ column (like the ‘0‘ mentioned in the error message), you’ll need to remove or change them. Be very careful with this step, as deleting the wrong thing could break your site. If you’re not comfortable doing this, it might be best to ask for help from a professional.
    4. Restore your backup again: After making these changes, try restoring your backup again. Make sure to follow the instructions provided by your backup solution carefully.
    5. Check your site: After the restore, check your site to see if the issue is resolved. If you’re still having trouble, it might be worth reaching out to the support team for your backup solution for help.

    Please remember that these steps involve making changes to your database, which can be risky. If you’re not comfortable doing this, I would strongly recommend reaching out to a professional or your hosting provider for help.

    I hope these steps help you regain access to your dashboard. If you have any other questions or need further assistance, please don’t hesitate to ask.

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

The topic ‘Action Scheduler – Duplicate entry ‘0’ error’ is closed to new replies.