• Resolved sitenoob247

    (@sitenoob247)


    Site looks good so far, BUT:
    after updated Mailpoet to 5.2.2 (my WP version is 6.2.2) these error messages are on my dashboard
    (I’m also not able to see settings or email or forms etc. after clicking them):

    MailPoet error: MailPoet\Doctrine\WPDB\Exceptions\QueryException: Duplicate entry ‘0’ for key ‘PRIMARY’ in /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-content/plugins/mailpoet/lib/Doctrine/WPDB/Connection.php:132
    Stack trace:
    #0 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-content/plugins/mailpoet/lib/Doctrine/WPDB/Connection.php(123): MailPoet\Doctrine\WPDB\Connection->handleQueryError()
    #1 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-content/plugins/mailpoet/lib/Doctrine/WPDB/Connection.php(35): MailPoet\Doctrine\WPDB\Connection->runQuery()
    #2 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-content/plugins/mailpoet/lib/Doctrine/WPDB/Statement.php(71): MailPoet\Doctrine\WPDB\Connection->query()
    #3 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-content/plugins/mailpoet/vendor-prefixed/doctrine/dbal/src/Connection.php(471): MailPoet\Doctrine\WPDB\Statement->execute()
    #4 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-content/plugins/mailpoet/lib/Config/Populator.php(532): MailPoetVendor\Doctrine\DBAL\Connection->executeStatement()
    #5 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-content/plugins/mailpoet/lib/Config/Populator.php(169): MailPoet\Config\Populator->populateNewsletterOptionFields()
    #6 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-content/plugins/mailpoet/lib/Config/Activator.php(80): MailPoet\Config\Populator->up()
    #7 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-content/plugins/mailpoet/lib/Config/Activator.php(60): MailPoet\Config\Activator->processActivate()
    #8 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-content/plugins/mailpoet/lib/Config/Initializer.php(431): MailPoet\Config\Activator->activate()
    #9 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-includes/class-wp-hook.php(324): MailPoet\Config\Initializer->maybeRunActivator()
    #10 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    #11 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-includes/plugin.php(517): WP_Hook->do_action()
    #12 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-settings.php(700): do_action()
    #13 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-config.php(88): require_once(‘…’)
    #14 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-load.php(50): require_once(‘…’)
    #15 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-admin/admin.php(34): require_once(‘…’)
    #16 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-admin/index.php(10): require_once(‘…’)
    #17 {main}

    Next MailPoetVendor\Doctrine\DBAL\Exception\UniqueConstraintViolationException: An exception occurred while executing a query: Duplicate entry ‘0’ for key ‘PRIMARY’ in /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-content/plugins/mailpoet/vendor-prefixed/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php:48
    Stack trace:
    #0 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-content/plugins/mailpoet/vendor-prefixed/doctrine/dbal/src/Connection.php(821): MailPoetVendor\Doctrine\DBAL\Driver\API\MySQL\ExceptionConverter->convert()
    #1 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-content/plugins/mailpoet/vendor-prefixed/doctrine/dbal/src/Connection.php(793): MailPoetVendor\Doctrine\DBAL\Connection->handleDriverException()
    #2 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-content/plugins/mailpoet/vendor-prefixed/doctrine/dbal/src/Connection.php(475): MailPoetVendor\Doctrine\DBAL\Connection->convertExceptionDuringQuery()
    #3 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-content/plugins/mailpoet/lib/Config/Populator.php(532): MailPoetVendor\Doctrine\DBAL\Connection->executeStatement()
    #4 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-content/plugins/mailpoet/lib/Config/Populator.php(169): MailPoet\Config\Populator->populateNewsletterOptionFields()
    #5 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-content/plugins/mailpoet/lib/Config/Activator.php(80): MailPoet\Config\Populator->up()
    #6 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-content/plugins/mailpoet/lib/Config/Activator.php(60): MailPoet\Config\Activator->processActivate()
    #7 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-content/plugins/mailpoet/lib/Config/Initializer.php(431): MailPoet\Config\Activator->activate()
    #8 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-includes/class-wp-hook.php(324): MailPoet\Config\Initializer->maybeRunActivator()
    #9 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    #10 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-includes/plugin.php(517): WP_Hook->do_action()
    #11 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-settings.php(700): do_action()
    #12 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-config.php(88): require_once(‘…’)
    #13 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-load.php(50): require_once(‘…’)
    #14 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-admin/admin.php(34): require_once(‘…’)
    #15 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-admin/index.php(10): require_once(‘…’)
    #16 {main}

    Any ideas, what to do? Can I repair the database perhaps?
    Thx

Viewing 15 replies - 1 through 15 (of 43 total)
  • Plugin Support Gui A. a11n

    (@guicmazeredo)

    Hi there,

    Thanks for reaching out and or sending the error you are seeing.

    For first troubleshooting steps, can you please give the following things a try?

    1. Create a backup of your website.
    2. Update WordPress to the latest version (6.6.2)
    3. Could you please follow the instructions to?re-install the plugin via FTP?and let us know if it resolves the issue? This will ensure no plugin files are missing or corrupted.

    After doing this, let us know if the issue persists.

    Thank you!

    exatechgroup

    (@exatechgroup)

    I am having the exact same issue even with the latest wp version and the latest plugin version updated via FTP, the issue remains.

    Thread Starter sitenoob247

    (@sitenoob247)

    1. Create a backup of your website.
      // Done
    2. Update WordPress to the latest version (6.6.2)
      // already installed before Mailpoet Update (see 1st post at the begin)
    3. Could you please follow the instructions to?re-install the plugin via FTP?and let us know if it resolves the issue? This will ensure no plugin files are missing or corrupted.
      // Done, same errors on dashboard / Mailpoet
    fixmybusiness

    (@fixmybusiness)

    I’m also having the same problems. Have had to remove the plugin completly as it keeps putting the site into critical error mode.

    Plugin Support Gui A. a11n

    (@guicmazeredo)

    Hey @sitenoob247 , @fixmybusiness and @exatechgroup . Can you please let us know if you are all still experiencing this issue?

    Also, can you confirm which MailPoet version you are running?

    Thank you!

    Thread Starter sitenoob247

    (@sitenoob247)

    Mailpoet updated to 5.3.0 (my WP version is 6.6.2 – german version), same errors as listed in the 1st post.

    Mailpoet 5.3.0, same issue.

    Plugin Author Jan Lysy

    (@lysyjan87)

    Hello @sitenoob247, @fixmybusiness, and @exatechgroup,

    I was unable to replicate the problem you mentioned:

    MailPoet error: MailPoet\Doctrine\WPDB\Exceptions\QueryException: Duplicate entry ‘0’ for key ‘PRIMARY’

    Based on the error message, it appears there may be an issue with your database structure, likely related to a corrupted auto-increment configuration. You can verify this by running the following database query:

    SELECT COLUMN_NAME, EXTRA
    FROM information_schema.COLUMNS
    WHERE TABLE_SCHEMA = 'wordpress'
    AND TABLE_NAME = 'wp_mailpoet_newsletter_option_fields'
    AND EXTRA LIKE '%auto_increment%';

    Please ensure that the database name (TABLE_SCHEMA) in the query matches the one in your wp-config.php file, and that the table name (TABLE_NAME) reflects your specific table prefix (e.g., wp_ by default, or a custom prefix if one is used).

    If this query returns no results, it indicates that the auto-increment setting may not be configured properly. This could be caused by a manual change or by a migration or backup tool, which may have been used for creating a staging site or restoring a backup.

    It’s important to note that the data in the wp_mailpoet_newsletter_option_fields table is inserted only once during the plugin activation and is never deleted by the MailPoet plugin.

    Could you let us know if you have recently used any plugins or tools for restoring your database, migrating between hosts, or similar actions? This information could help us pinpoint the cause of the issue. You can also share the version of the database used on your website.

    Thread Starter sitenoob247

    (@sitenoob247)

    // The query returned no results. I see, there is no auto_increment entry in Column Extra
    at table 'wp_mailpoet_newsletter_option_fields':

    Could you let us know if you have recently used any plugins or tools for restoring your database, migrating between hosts, or similar actions?
    // No. Every other plugin etc. works fine, no errors, beside Mailpoet.

    The problem first occured after updating to Mailpoet 5.2.2.
    I never had any problems with Mailpoet before.

    No results here either and everything’s fine on the wordpress and plugins side.

    I have to downgrade to prior 5.2.2 to make the warning stop.

    Thread Starter sitenoob247

    (@sitenoob247)

    //You can also share the version of the database used on your website.

    My database version:
    https://www.trackdays.de/dl/Screenshot 2024-10-11 111304.png

    I urgently need to send a newsletter in the upcoming days.
    So I need possibly to downgrade before Mailpoet 5.2.2.
    Where can I find older versions? Will there come up problems because of downgrading?

    Thread Starter sitenoob247

    (@sitenoob247)

    @exatechgroup: thank you! ??

    I took the time now to check, with which version my listed errors are shown in dashboard and Mailpoet stops working:
    5.1.0 -> all good, no errors, plugin works fine
    5.1.1 -> all good, no errors, plugin works fine
    5.2.0 -> all good, no errors, plugin works fine
    5.2.1 -> all good, no errors, plugin works fine
    5.2.2 -> errors, plugin doesn’t work, not able to create newsletter etc.

    BUT:
    After updated to 5.2.1, WordPress sent an email (“your site has a technical problem”) with the following error, but I still was able to work with the plugin:

    An Error Type E_ERROR has been caused in line 77 of file /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-content/plugins/mailpoet/lib/Util/Notices/PermanentNotices.php. 
    Error: Uncaught TypeError: MailPoet\Util\Notices\PermanentNotices::__construct(): Argument #2 ($entityManager) must be of type MailPoetVendor\Doctrine\ORM\EntityManager, MailPoet\Cron\CronHelper given, called in /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php on line 2654 and defined in /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-content/plugins/mailpoet/lib/Util/Notices/PermanentNotices.php:77
    Stack trace:
    #0 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(2654): MailPoet\Util\Notices\PermanentNotices->__construct()
    #1 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-content/plugins/mailpoet/vendor-prefixed/symfony/dependency-injection/Container.php(122): MailPoetGenerated\FreeCachedContainer->getInitializerService()
    #2 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-content/plugins/mailpoet/vendor-prefixed/symfony/dependency-injection/Container.php(110): MailPoetVendor\Symfony\Component\DependencyInjection\Container->make()
    #3 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-content/plugins/mailpoet/lib/DI/ContainerWrapper.php(39): MailPoetVendor\Symfony\Component\DependencyInjection\Container->get()
    #4 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-content/plugins/mailpoet/mailpoet_initializer.php(88): MailPoet\DI\ContainerWrapper->get()
    #5 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-content/plugins/mailpoet/mailpoet.php(194): require_once('...')
    #6 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-settings.php(522): include_once('...')
    #7 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-config.php(88): require_once('...')
    #8 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-load.php(50): require_once('...')
    #9 /var/www/vhosts/trackdays.sina.hostkraft.de/html/trackdays/wp-admin/admin-ajax.php(22): require_once('...')
    #10 {main}
    thrown

    I hope, I could help with this information, so the support is able to find out, what causes the error(s).
    Errors seem to be caused by one or more files that were updated from 5.21 to 5.2.2.
    Because 5.2.1 works so far and is able to access the database correctly, it looks like the DB is ok…

    I will work now with 5.2.1 until an update will fix the error(s).

    Thread Starter sitenoob247

    (@sitenoob247)

    double post, sorry.


    • This reply was modified 4 months, 3 weeks ago by sitenoob247.

    It’s working with the latest version.

    5.3.1

Viewing 15 replies - 1 through 15 (of 43 total)
  • You must be logged in to reply to this topic.