Error and Campaign-Update Issue after Update to 1.2.3

Hey,



after updating Mautic 2 days ago my campaigns don’t update with new leads. Mails will be sent and Lists will be updated correctly.

I made no change regarding the cronjobs.

The update-process was without any problems.



I have an error in the mautic logfile now - I don’t know if there is any coherence:



[2015-12-31 21:53:03] mautic.ERROR: DoctrineDBALDBALException: An exception occurred while executing ‘SELECT max(list_leads.lead_id) as max_id, count(distinct(list_leads.lead_id)) as lead_count FROM lead_lists_leads list_leads WHERE (list_leads.manually_removed = ?) AND (list_leads.leadlist_id IN ()) AND (list_leads.date_added <= ‘2015-12-31 21:53:03’) AND (NOT EXISTS (SELECT null FROM campaign_leads campaign_leads WHERE (campaign_leads.lead_id = list_leads.lead_id) AND (campaign_leads.manually_removed = ?) AND (campaign_leads.campaign_id = 1)))’ with params [0, 0]: SQLSTATE[42000]: Syntax error or access violation: 1064 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 ')) AND (list_leads.date_added <= ‘2015-12-31 21:53:03’) AND (NOT EXISTS (SELECT ’ at line 1 (uncaught exception) at /var/www/html/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 91 while running console command mautic:campaigns:update [] []



The error will be thrown every 30 minutes.



Any idea?



Regards,

Sai

Hey,

after updating Mautic 2 days ago my campaigns don’t update with new leads. Mails will be sent and Lists will be updated correctly.
I made no change regarding the cronjobs.
The update-process was without any problems.

I have an error in the mautic logfile now - I don’t know if there is any coherence:

[2015-12-31 21:53:03] mautic.ERROR: DoctrineDBALDBALException: An exception occurred while executing ‘SELECT max(list_leads.lead_id) as max_id, count(distinct(list_leads.lead_id)) as lead_count FROM lead_lists_leads list_leads WHERE (list_leads.manually_removed = ?) AND (list_leads.leadlist_id IN ()) AND (list_leads.date_added <= ‘2015-12-31 21:53:03’) AND (NOT EXISTS (SELECT null FROM campaign_leads campaign_leads WHERE (campaign_leads.lead_id = list_leads.lead_id) AND (campaign_leads.manually_removed = ?) AND (campaign_leads.campaign_id = 1)))’ with params [0, 0]: SQLSTATE[42000]: Syntax error or access violation: 1064 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 ')) AND (list_leads.date_added <= ‘2015-12-31 21:53:03’) AND (NOT EXISTS (SELECT ’ at line 1 (uncaught exception) at /var/www/html/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 91 while running console command mautic:campaigns:update [] []

The error will be thrown every 30 minutes.

Any idea?

Regards,
Sai

Hi Sai,

Yea it’s a bug that in 1.2.3 that affects campaigns that use only forms as lead sources. A couple options are to either patch the code with https://github.com/mautic/mautic/pull/1286 or you can simply add a “bogus” lead list as a lead list to prevent the error.

Thanks!
Alan

Hi Alan,

Thanks yor your reply!

But my campaign is using a lead list as source not a form…

Regards,
Sai

Hmmm… (list_leads.leadlist_id IN ()) (the IN is empty) suggests it’s not finding any lists for campaign ID #1. Can you verify that there are lists for that campaign? It may be a different bug we have to explore.