• Resolved neilmstevenson

    (@neilmstevenson)


    When I activate the MailPoet plugin, it fails and displays “There has been a critical error on this website.”

    The email from the site the details the following. There are no other errors on the site.

    Error Details
    =============
    An error of type E_ERROR was caused in line 53 of the file /srv/www/wordpress/wp-content/plugins/mailpoet/vendor-prefixed/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php. Error message: Uncaught MailPoet\Doctrine\WPDB\Exceptions\QueryException: Unknown column 't0.confirmation_email_id' in 'field list' in /srv/www/wordpress/wp-content/plugins/mailpoet/lib/Doctrine/WPDB/Connection.php:132
    Stack trace:
    #0 /srv/www/wordpress/wp-content/plugins/mailpoet/lib/Doctrine/WPDB/Connection.php(123): MailPoet\Doctrine\WPDB\Connection->handleQueryError()
    #1 /srv/www/wordpress/wp-content/plugins/mailpoet/lib/Doctrine/WPDB/Connection.php(35): MailPoet\Doctrine\WPDB\Connection->runQuery()
    #2 /srv/www/wordpress/wp-content/plugins/mailpoet/lib/Doctrine/WPDB/Statement.php(71): MailPoet\Doctrine\WPDB\Connection->query()
    #3 /srv/www/wordpress/wp-content/plugins/mailpoet/vendor-prefixed/doctrine/dbal/src/Connection.php(418): MailPoet\Doctrine\WPDB\Statement->execute()
    #4 /srv/www/wordpress/wp-content/plugins/mailpoet/vendor-prefixed/doctrine/orm/src/Persisters/Entity/BasicEntityPersister.php(408): MailPoetVendor\Doctrine\DBAL\Connection->executeQuery()
    #5 /srv/www/wordpress/wp-content/plugins/mailpoet/vendor-prefixed/doctrine/orm/src/EntityRepository.php(84): MailPoetVendor\Doctrine\ORM\Persisters\Entity\BasicEntityPersister->load()
    #6 /srv/www/wordpress/wp-content/plugins/mailpoet/lib/Doctrine/Repository.php(71): MailPoetVendor\Doctrine\ORM\EntityRepository->findOneBy()
    #7 /srv/www/wordpress/wp-content/plugins/mailpoet/lib/Segments/SegmentsRepository.php(88): MailPoet\Doctrine\Repository->findOneBy()
    #8 /srv/www/wordpress/wp-content/plugins/mailpoet/lib/AdminPages/PageRenderer.php(144): MailPoet\Segments\SegmentsRepository->getWPUsersSegment()
    #9 /srv/www/wordpress/wp-content/plugins/mailpoet/lib/AdminPages/Pages/Landingpage.php(37): MailPoet\AdminPages\PageRenderer->displayPage()
    #10 /srv/www/wordpress/wp-content/plugins/mailpoet/lib/Config/Menu.php(631): MailPoet\AdminPages\Pages\Landingpage->render()
    #11 /srv/www/wordpress/wp-includes/class-wp-hook.php(341): MailPoet\Config\Menu->landingPage()
    #12 /srv/www/wordpress/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters()
    #13 /srv/www/wordpress/wp-includes/plugin.php(522): WP_Hook->do_action()
    #14 /srv/www/wordpress/wp-admin/admin.php(264): do_action()
    #15 {main}

    Next MailPoetVendor\Doctrine\DBAL\Exception\InvalidFieldNameException: An exception occurred while executing a query: Unknown column 't0.confirmation_email_id' in 'field list' in /srv/www/wordpress/wp-content/plugins/mailpoet/vendor-prefixed/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php:53
    Stack trace:
    #0 /srv/www/wordpress/wp-content/plugins/mailpoet/vendor-prefixed/doctrine/dbal/src/Connection.php(848): MailPoetVendor\Doctrine\DBAL\Driver\API\MySQL\ExceptionConverter->convert()
    #1 /srv/www/wordpress/wp-content/plugins/mailpoet/vendor-prefixed/doctrine/dbal/src/Connection.php(820): MailPoetVendor\Doctrine\DBAL\Connection->handleDriverException()
    #2 /srv/www/wordpress/wp-content/plugins/mailpoet/vendor-prefixed/doctrine/dbal/src/Connection.php(424): MailPoetVendor\Doctrine\DBAL\Connection->convertExceptionDuringQuery()
    #3 /srv/www/wordpress/wp-content/plugins/mailpoet/vendor-prefixed/doctrine/orm/src/Persisters/Entity/BasicEntityPersister.php(408): MailPoetVendor\Doctrine\DBAL\Connection->executeQuery()
    #4 /srv/www/wordpress/wp-content/plugins/mailpoet/vendor-prefixed/doctrine/orm/src/EntityRepository.php(84): MailPoetVendor\Doctrine\ORM\Persisters\Entity\BasicEntityPersister->load()
    #5 /srv/www/wordpress/wp-content/plugins/mailpoet/lib/Doctrine/Repository.php(71): MailPoetVendor\Doctrine\ORM\EntityRepository->findOneBy()
    #6 /srv/www/wordpress/wp-content/plugins/mailpoet/lib/Segments/SegmentsRepository.php(88): MailPoet\Doctrine\Repository->findOneBy()
    #7 /srv/www/wordpress/wp-content/plugins/mailpoet/lib/AdminPages/PageRenderer.php(144): MailPoet\Segments\SegmentsRepository->getWPUsersSegment()
    #8 /srv/www/wordpress/wp-content/plugins/mailpoet/lib/AdminPages/Pages/Landingpage.php(37): MailPoet\AdminPages\PageRenderer->displayPage()
    #9 /srv/www/wordpress/wp-content/plugins/mailpoet/lib/Config/Menu.php(631): MailPoet\AdminPages\Pages\Landingpage->render()
    #10 /srv/www/wordpress/wp-includes/class-wp-hook.php(341): MailPoet\Config\Menu->landingPage()
    #11 /srv/www/wordpress/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters()
    #12 /srv/www/wordpress/wp-includes/plugin.php(522): WP_Hook->do_action()
    #13 /srv/www/wordpress/wp-admin/admin.php(264): do_action()
    #14 {main}
      thrown
Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Ján Mikláš

    (@neosinner)

    Hi @neilmstevenson, this looks like failed database migration. Could you please try to deactivate and activate the plugin, which should run the failed migration again?

    Thread Starter neilmstevenson

    (@neilmstevenson)

    Hi @neosinner, I tried that several times and still the same error. I also deleted the plugin then did a full re-install. I have just upgraded to 5.26.1 and I am still getting the same error.

    Plugin Author Ján Mikláš

    (@neosinner)

    @neilmstevenson any chance that you have a plugin or theme that integrates with MailPoet though public API? If so, it can happen, that the integration calls the API sooner than MailPoet has a chance to run the database migration, resulting in this error. Temporarily disabling that plugin/theme would let MailPoet migrations to run, which should resolve the issue.

    Thread Starter neilmstevenson

    (@neilmstevenson)

    @neosinner I am running the Envo Royal Theme and I cannot remember any other plugins that integrate with MailPoet. I certainly have not setup any MailPoet API’s anywhere.

    Plugin Author Ján Mikláš

    (@neosinner)

    @neilmstevenson, thanks for checking. In that case this looks like MailPoet’s database migration didn’t complete properly.

    Could you please check, or ask your host to check, whether the mailpoet_segments table has these columns: confirmation_email_id and confirmation_page_id?

    If possible, please also check whether Migration_20260415_090055_Db is listed in the mailpoet_migrations table. That should tell us whether the migration failed, or whether it was marked as completed even though the columns weren’t added.

    Thread Starter neilmstevenson

    (@neilmstevenson)

    @neosinner Those two columns are not in the mailpoet_segments table. I have the following columns in that table – id, name, type, description, created_at, updated_at, deleted_at, average_engagement_score, average_engagement_score_updated_at & display_in_manage_subscription_page

    Migration_20260415_090055_Db is NOT listed in the mailpoet_migrations table.

    I have full root access to the server.

    I seem to have a related problem. I tried installing MailPoet yesterday, but got the same fatal error. The last row in the mailpoet_migrations table is “Migration_20250903_151331_Db”, and the error field has the information below. I tried to remove MailPoet and install it again, but that did not work either.

    MailPoet\Doctrine\WPDB\Exceptions\QueryException: INDEX command denied to user XXX for table mailpoet_log in /www/webvol16/dy/aqtpv4w99vrzj20/fftm.se/public_html/blogg/wp-content/plugins/mailpoet/lib/Doctrine/WPDB/Connection.php:132
    Stack trace: 0 /www/webvol16/dy/aqtpv4w99vrzj20/fftm.se/public_html/blogg/wp-content/plugins/mailpoet/lib/Doctrine/WPDB/Connection.php(123): MailPoet\Doctrine\WPDB\Connection->handleQueryError() 1 /www/webvol16/dy/aqtpv4w99vrzj20/fftm.se/public_html/blogg/wp-content/plugins/mailpoet/lib/Doctrine/WPDB/Connection.php(35): MailPoet\Doctrine\WPDB\Connection->runQuery(‘CREATE INDEX i…') 2 /www/webvol16/dy/aqtpv4w99vrzj20/fftm.se/public_html/blogg/wp-content/plugins/mailpoet/vendor-prefixed/doctrine/dbal/src/Connection.php(420): MailPoet\Doctrine\WPDB\Connection->query('CREATE INDEXi…’) 3 /www/webvol16/dy/aqtpv4w99vrzj20/fftm.se/public_html/blogg/wp-content/plugins/mailpoet/lib/Migrations/Db/Migration_20250903_151331_Db.php(19): MailPoetVendor\Doctrine\DBAL\Connection->executeQuery(‘CREATE INDEX `i…’) 4 /www/webvol16/dy/aqtpv4w99vrzj20/fftm.se/public_html/blogg/wp-content/plugins/mailpoet/lib/Migrator/Runner.php(35): MailPoet\Migrations\Db\Migration_20250903_151331_Db->run() 5 /www/webvol16/dy/aqtpv4w99vrzj20/fftm.se/public_html/blogg/wp-content/plugins/mailpoet/lib/Migrator/Migrator.php(53): MailPoet\Migrator\Runner->runMigration(‘Migration_20250…’, ‘db’) 6 /www/webvol16/dy/aqtpv4w99vrzj20/fftm.se/public_html/blogg/wp-content/plugins/mailpoet/lib/Config/Activator.php(85): MailPoet\Migrator\Migrator->run() 7 /www/webvol16/dy/aqtpv4w99vrzj20/fftm.se/public_html/blogg/wp-content/plugins/mailpoet/lib/Config/Activator.php(67): MailPoet\Config\Activator->processActivate() 8 /www/webvol16/dy/aqtpv4w99vrzj20/fftm.se/public_html/blogg/wp-content/plugins/mailpoet/lib/Config/Initializer.php(458): MailPoet\Config\Activator->activate() 9 /www/webvol16/dy/aqtpv4w99vrzj20/fftm.se/public_html/blogg/wp-includes/class-wp-hook.php(341): MailPoet\Config\Initializer->maybeRunActivator(”) 10 /www/webvol16/dy/aqtpv4w99vrzj20/fftm.se/public_html/blogg/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters(”, Array) 11 /www/webvol16/dy/aqtpv4w99vrzj20/fftm.se/public_html/blogg/wp-includes/plugin.php(522): WP_Hook->do_action(Array) 12 /www/webvol16/dy/aqtpv4w99vrzj20/fftm.se/public_html/blogg/wp-settings.php(742): do_action(‘init’) 13 /www/webvol16/dy/aqtpv4w99vrzj20/fftm.se/public_html/blogg/wp-config.php(119): require_once(‘/www/webvol16/d…’) 14 /www/webvol16/dy/aqtpv4w99vrzj20/fftm.se/public_html/blogg/wp-load.php(50): require_once(‘/www/webvol16/d…’) 15 /www/webvol16/dy/aqtpv4w99vrzj20/fftm.se/public_html/blogg/wp-admin/admin.php(35): require_once(‘/www/webvol16/d…’) 16 /www/webvol16/dy/aqtpv4w99vrzj20/fftm.se/public_html/blogg/wp-admin/plugins.php(10): require_once(‘/www/webvol16/d…’) 17 {main}</p> <p>Next MailPoetVendor\Doctrine\DBAL\Exception\ConnectionException: An exception occurred while executing a query: INDEX command denied to user XXX for table <code>mailpoet_log</code> in /www/webvol16/dy/aqtpv4w99vrzj20/fftm.se/public_html/blogg/wp-content/plugins/mailpoet/vendor-prefixed/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php:91<br>Stack trace: 0 /www/webvol16/dy/aqtpv4w99vrzj20/fftm.se/public_html/blogg/wp-content/plugins/mailpoet/vendor-prefixed/doctrine/dbal/src/Connection.php(848): MailPoetVendor\Doctrine\DBAL\Driver\API\MySQL\ExceptionConverter->convert(Object(MailPoet\Doctrine\WPDB\Exceptions\QueryException), Object(MailPoetVendor\Doctrine\DBAL\Query)) 1 /www/webvol16/dy/aqtpv4w99vrzj20/fftm.se/public_html/blogg/wp-content/plugins/mailpoet/vendor-prefixed/doctrine/dbal/src/Connection.php(820): MailPoetVendor\Doctrine\DBAL\Connection->handleDriverException(Object(MailPoet\Doctrine\WPDB\Exceptions\QueryException), Object(MailPoetVendor\Doctrine\DBAL\Query)) 2 /www/webvol16/dy/aqtpv4w99vrzj20/fftm.se/public_html/blogg/wp-content/plugins/mailpoet/vendor-prefixed/doctrine/dbal/src/Connection.php(424): MailPoetVendor\Doctrine\DBAL\Connection->convertExceptionDuringQuery(Object(MailPoet\Doctrine\WPDB\Exceptions\QueryException), ‘CREATE INDEX i…', Array, Array) 3 /www/webvol16/dy/aqtpv4w99vrzj20/fftm.se/public_html/blogg/wp-content/plugins/mailpoet/lib/Migrations/Db/Migration_20250903_151331_Db.php(19): MailPoetVendor\Doctrine\DBAL\Connection->executeQuery('CREATE INDEXi…’) 4 /www/webvol16/dy/aqtpv4w99vrzj20/fftm.se/public_html/blogg/wp-content/plugins/mailpoet/lib/Migrator/Runner.php(35): MailPoet\Migrations\Db\Migration_20250903_151331_Db->run() 5 /www/webvol16/dy/aqtpv4w99vrzj20/fftm.se/public_html/blogg/wp-content/plugins/mailpoet/lib/Migrator/Migrator.php(53): MailPoet\Migrator\Runner->runMigration(‘Migration_20250…’, ‘db’) 6 /www/webvol16/dy/aqtpv4w99vrzj20/fftm.se/public_html/blogg/wp-content/plugins/mailpoet/lib/Config/Activator.php(85): MailPoet\Migrator\Migrator->run() 7 /www/webvol16/dy/aqtpv4w99vrzj20/fftm.se/public_html/blogg/wp-content/plugins/mailpoet/lib/Config/Activator.php(67): MailPoet\Config\Activator->processActivate() 8 /www/webvol16/dy/aqtpv4w99vrzj20/fftm.se/public_html/blogg/wp-content/plugins/mailpoet/lib/Config/Initializer.php(458): MailPoet\Config\Activator->activate() 9 /www/webvol16/dy/aqtpv4w99vrzj20/fftm.se/public_html/blogg/wp-includes/class-wp-hook.php(341): MailPoet\Config\Initializer->maybeRunActivator(”) 10 /www/webvol16/dy/aqtpv4w99vrzj20/fftm.se/public_html/blogg/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters(”, Array) 11 /www/webvol16/dy/aqtpv4w99vrzj20/fftm.se/public_html/blogg/wp-includes/plugin.php(522): WP_Hook->do_action(Array) 12 /www/webvol16/dy/aqtpv4w99vrzj20/fftm.se/public_html/blogg/wp-settings.php(742): do_action(‘init’) 13 /www/webvol16/dy/aqtpv4w99vrzj20/fftm.se/public_html/blogg/wp-config.php(119): require_once(‘/www/webvol16/d…’) 14 /www/webvol16/dy/aqtpv4w99vrzj20/fftm.se/public_html/blogg/wp-load.php(50): require_once(‘/www/webvol16/d…’) 15 /www/webvol16/dy/aqtpv4w99vrzj20/fftm.se/public_html/blogg/wp-admin/admin.php(35): require_once(‘/www/webvol16/d…’) 16 /www/webvol16/dy/aqtpv4w99vrzj20/fftm.se/public_html/blogg/wp-admin/plugins.php(10): require_once(‘/www/webvol16/d…’) 17 {main}

    Plugin Support nathvi V. a11n

    (@nathvi)

    Hi @sliljas

    Thanks for reaching out. While your error may appear similar, each site’s environment can have different underlying causes, and we’d want to investigate your specific situation properly.

    Could you please open a new support thread so we can look into your issue individually? That way we can keep troubleshooting focused and avoid any confusion between the two cases.

    You can create a new thread here: https://ww.wp.xz.cn/support/plugin/mailpoet/#new-topic

    Thread Starter neilmstevenson

    (@neilmstevenson)

    @neosinner I noticed that there was a new version (5.27.0) so I removed the MailPoet plugin and dropped all the tables for mailpoet. I then did a fresh install and it is still failing for me.

    On checking the mailpoet_migrations table, the last entry is for Migration_20250903_151331_Db and the error is –

    MailPoet\Doctrine\WPDB\Exceptions\QueryException: INDEX command denied to user ‘wordpress’@’localhost’ for table ‘wp_mailpoet_log’ in /srv/www/wordpress/wp-content/plugins/mailpoet/lib/Doctrine/WPDB/Connection.php:132
    Stack trace: 0 /srv/www/wordpress/wp-content/plugins/mailpoet/lib/Doctrine/WPDB/Connection.php(123): MailPoet\Doctrine\WPDB\Connection->handleQueryError() 1 /srv/www/wordpress/wp-content/plugins/mailpoet/lib/Doctrine/WPDB/Connection.php(35): MailPoet\Doctrine\WPDB\Connection->runQuery() 2 /srv/www/wordpress/wp-content/plugins/mailpoet/vendor-prefixed/doctrine/dbal/src/Connection.php(420): MailPoet\Doctrine\WPDB\Connection->query() 3 /srv/www/wordpress/wp-content/plugins/mailpoet/lib/Migrations/Db/Migration_20250903_151331_Db.php(19): MailPoetVendor\Doctrine\DBAL\Connection->executeQuery() 4 /srv/www/wordpress/wp-content/plugins/mailpoet/lib/Migrator/Runner.php(35): MailPoet\Migrations\Db\Migration_20250903_151331_Db->run() 5 /srv/www/wordpress/wp-content/plugins/mailpoet/lib/Migrator/Migrator.php(53): MailPoet\Migrator\Runner->runMigration() 6 /srv/www/wordpress/wp-content/plugins/mailpoet/lib/Config/Activator.php(85): MailPoet\Migrator\Migrator->run() 7 /srv/www/wordpress/wp-content/plugins/mailpoet/lib/Config/Activator.php(67): MailPoet\Config\Activator->processActivate() 8 /srv/www/wordpress/wp-content/plugins/mailpoet/lib/Config/Initializer.php(465): MailPoet\Config\Activator->activate() 9 /srv/www/wordpress/wp-includes/class-wp-hook.php(341): MailPoet\Config\Initializer->maybeRunActivator() 10 /srv/www/wordpress/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters() 11 /srv/www/wordpress/wp-includes/plugin.php(522): WP_Hook->do_action() 12 /srv/www/wordpress/wp-settings.php(742): do_action() 13 /srv/www/wordpress/wp-config.php(116): require_once(‘…’) 14 /srv/www/wordpress/wp-load.php(50): require_once(‘…’) 15 /srv/www/wordpress/wp-blog-header.php(13): require_once(‘…’) 16 /srv/www/wordpress/index.php(17): require(‘…’) 17 {main}

    Next MailPoetVendor\Doctrine\DBAL\Exception\ConnectionException: An exception occurred while executing a query: INDEX command denied to user ‘wordpress’@’localhost’ for table ‘wp_mailpoet_log’ in /srv/www/wordpress/wp-content/plugins/mailpoet/vendor-prefixed/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php:91
    Stack trace: 0 /srv/www/wordpress/wp-content/plugins/mailpoet/vendor-prefixed/doctrine/dbal/src/Connection.php(848): MailPoetVendor\Doctrine\DBAL\Driver\API\MySQL\ExceptionConverter->convert() 1 /srv/www/wordpress/wp-content/plugins/mailpoet/vendor-prefixed/doctrine/dbal/src/Connection.php(820): MailPoetVendor\Doctrine\DBAL\Connection->handleDriverException() 2 /srv/www/wordpress/wp-content/plugins/mailpoet/vendor-prefixed/doctrine/dbal/src/Connection.php(424): MailPoetVendor\Doctrine\DBAL\Connection->convertExceptionDuringQuery() 3 /srv/www/wordpress/wp-content/plugins/mailpoet/lib/Migrations/Db/Migration_20250903_151331_Db.php(19): MailPoetVendor\Doctrine\DBAL\Connection->executeQuery() 4 /srv/www/wordpress/wp-content/plugins/mailpoet/lib/Migrator/Runner.php(35): MailPoet\Migrations\Db\Migration_20250903_151331_Db->run() 5 /srv/www/wordpress/wp-content/plugins/mailpoet/lib/Migrator/Migrator.php(53): MailPoet\Migrator\Runner->runMigration() 6 /srv/www/wordpress/wp-content/plugins/mailpoet/lib/Config/Activator.php(85): MailPoet\Migrator\Migrator->run() 7 /srv/www/wordpress/wp-content/plugins/mailpoet/lib/Config/Activator.php(67): MailPoet\Config\Activator->processActivate() 8 /srv/www/wordpress/wp-content/plugins/mailpoet/lib/Config/Initializer.php(465): MailPoet\Config\Activator->activate() 9 /srv/www/wordpress/wp-includes/class-wp-hook.php(341): MailPoet\Config\Initializer->maybeRunActivator() 10 /srv/www/wordpress/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters() 11 /srv/www/wordpress/wp-includes/plugin.php(522): WP_Hook->do_action() 12 /srv/www/wordpress/wp-settings.php(742): do_action() 13 /srv/www/wordpress/wp-config.php(116): require_once(‘…’) 14 /srv/www/wordpress/wp-load.php(50): require_once(‘…’) 15 /srv/www/wordpress/wp-blog-header.php(13): require_once(‘…’) 16 /srv/www/wordpress/index.php(17): require(‘…’) 17 {main}

    Plugin Author Ján Mikláš

    (@neosinner)

    @neilmstevenson this points to a database permission issue. MailPoet’s migration Migration_20250903_151331_Db needs to create an index on wp_mailpoet_log, but your WordPress database user does not have the INDEX privilege. Please ask your host to grant the WordPress database user permission to create indexes on the WordPress database, then reactivate MailPoet or rerun the migration. Once that migration completes, the later migrations should run too.

    Thread Starter neilmstevenson

    (@neilmstevenson)

    @neosinner I never knew that the Grant ALL did not grant INDEX. Privilege granted and plugin is now working, thanks for all your help.

    Hello!

    I just wanted to let you know that the problem for me was a lack of indexing permissions too, so my issue was solved for free!

    All the best!

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

You must be logged in to reply to this topic.