Mautic Ver 3.02 campaigns not sending email - Email not found or published

Your software
My Mautic version is: 3.02
My PHP version is:7.2.34

Your problem
My problem is: Emails triggered by campaigns are not being set

These errors are showing in the log: No errors showing

Steps I have tried to fix the problem:
Emails are being sent by forms and when manually sent. Crons are working as other tasks run by the same campaign it firing. The email is showing in the contact’s history but with an error - this event encountered an error during the last attempt to process
Last execution error: Email not found or published

But the email is most def published and exists. I have removed and re-added the email to the campaign, as well sent it manually with no issues.

I have tried creating a brand new campaign with brand new emails and all are failing with the same error message. As an experienced Mautic user I have spent hrs setting this particular instance up, complete with dynamic content and host of awesome features. It’s almost the culmination of all my years of Mautic experience. Now to fall at the last hurdle with a failure of a fundamental Mautic feature - campaign triggered emails, is infuriating to say the least.

I have deleted cache and checked logs - nothing. Just “Last execution error: Email not found or published” in the contact history logs.

I sincerely hope some kind soul in the Mautic community can take the time to help me fix this. All my other (23 and counting) Mautic installs work just fine. This instance is hosted on the same server as all the others.

Finally got an error in the log

[2020-10-11 19:43:09] mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\SyntaxErrorException: “An exception occurred while executing ‘REPLACE INTO maukw_campaign_lead_event_failed_log( log_id, date_added, reason) SELECT id, :dateAdded as date_added, :message as reason from maukw_campaign_lead_event_log WHERE is_scheduled = 1 AND lead_id = :contactId AND campaign_id = :campaignId AND rotation = :rotation’: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':dateAdded as date_added, :message as reason from maukw_campaign_lead_event_log ’ at line 2” at /home/company/demo.company.biz/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 79 {“exception”:“[object] (Doctrine\DBAL\Exception\SyntaxErrorException(code: 0): An exception occurred while executing ‘REPLACE INTO maukw_campaign_lead_event_failed_log( log_id, date_added, reason)\nSELECT id, :dateAdded as date_added, :message as reason from maukw_campaign_lead_event_log\nWHERE is_scheduled = 1 AND lead_id = :contactId AND campaign_id = :campaignId AND rotation = :rotation’:\n\nYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘:dateAdded as date_added, :message as reason from maukw_campaign_lead_event_log\n’ at line 2 at /home/company/demo.company.biz/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:79, Doctrine\DBAL\Driver\Mysqli\MysqliException(code: 0): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘:dateAdded as date_added, :message as reason from maukw_campaign_lead_event_log\n’ at line 2 at /home/company/demo.company.biz/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php:86)”}

solved the issue

1 Like