• Resolved fanglinx

    (@fanglinx)


    Hi, I just migrated my test site to the live site a few days ago. When I activate the plugin, the database error message shows in my website error log. After that, I tried to send the test email and the email was successfully delivered. However, this error message keeps adding to my error log file every minute, which causes my error log file to keep growing.

    BTW, I have already tried to repair the table but it did not work.
    Thanks a lot!

    PHP message: WordPress database error Duplicate entry '0' for key 'PRIMARY' for query INSERT INTOwp_wpmailsmtp_tasks_meta(action,data,date) VALUES ('wp_mail_smtp_admin_notifications_update', 'W10=', '2022-01-17 09:25:45') made by require_once('wp-admin/admin-header.php'), do_action('in_admin_header'), WP_Hook->do_action, WP_Hook->apply_filters, wp_admin_bar_render, do_action_ref_array('admin_bar_menu'), WP_Hook->do_action, WP_Hook->apply_filters, WPMailSMTP\Admin\AdminBarMenu->register, WPMailSMTP\Admin\AdminBarMenu->has_notifications, WPMailSMTP\Admin\Notifications->get_count, WPMailSMTP\Admin\Notifications->get, WPMailSMTP\Tasks\Task->register, WPMailSMTP\Tasks\Meta->add, WPMailSMTP\Tasks\Meta->add_to_dbPHP message: WordPress database error Duplicate entry '0' for key 'PRIMARY' for query INSERT INTOwp_wpmailsmtp_tasks_meta(action,data,date) VALUES ('wp_mail_smtp_admin_notifications_update', 'W10=', '2022-01-17 09:25:45') made by require_once('wp-admin/admin-header.php'), do_action('in_admin_header'), WP_Hook->do_action, WP_Hook->apply_filters, wp_admin_bar_render, do_action_ref_array('admin_bar_menu'), WP_Hook->do_action, WP_Hook->apply_filters, WPMailSMTP\Admin\AdminBarMenu->register, WPMailSMTP\Admin\AdminBarMenu->main_menu, WPMailSMTP\Admin\AdminBarMenu->has_notifications, WPMailSMTP\Admin\Notifications->get_count, WPMailSMTP\Admin\Notifications->get, WPMailSMTP\Tasks\Task->register, WPMailSMTP\Tasks\Meta->add, WPMailSMTP\Tasks\Meta->add_to_dbPHP message: WordPress database error Duplicate entry '0' for key 'PRIMARY' for query INSERT INTOwp_wpmailsmtp_tasks_meta(action,data,date) VALUES ('wp_mail_smtp_admin_notifications_update', 'W10=', '2022-01-17 09:25:45') made by require_once('wp-admin/admin-header.php'), do_action('in_admin_header'), WP_Hook->do_action, WP_Hook->apply_filters, wp_admin_bar_render, do_action_ref_array('admin_bar_menu'), WP_Hook->do_action, WP_Hook->apply_filters, WPMailSMTP\Admin\

    • This topic was modified 2 years, 10 months ago by fanglinx.
    • This topic was modified 2 years, 10 months ago by fanglinx.
    • This topic was modified 2 years, 10 months ago by fanglinx.
    • This topic was modified 2 years, 10 months ago by fanglinx.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Darshana

    (@darshanaw)

    Hi @fanglinx,

    Thanks for reaching out! It looks like you have experienced a database migration issue.

    Could you please check the database structure of this table wp_wpmailsmtp_tasks_meta and make sure there’s a primary key & auto-increment set for the ID. In case it helps, here’s a screenshot for you to follow.

    I hope this helps. Thanks!

    Thread Starter fanglinx

    (@fanglinx)

    Hi @darshanaw,

    Thanks for the response, I’ve tried this method but the database also showed an error message:

    #1062 – ALTER TABLE causes auto_increment resequencing, resulting in duplicate entry ‘1’ for key ‘PRIMARY

    Can I clear the ‘wp_wpmailsmtp_tasks_meta’ table and try this method again? Or it may break the whole database if I do so?

    Thanks!

    Plugin Support Darshana

    (@darshanaw)

    Hi @fanglinx,

    As I have checked with our developers, you can clear the content of that table (don’t delete the database table) and then you also need to delete all the scheduled actions under the WP Mail SMTP -> Tools -> Scheduled Actions area.

    Could you please give it a try and let us know how it goes.

    Thanks!

    Thread Starter fanglinx

    (@fanglinx)

    Hi, @darshanaw

    Your advice perfectly solved the error.
    Thanks for your help!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WordPress database error’ is closed to new replies.