# Error and Campaign-Update Issue after Update to 1.2.3

**URL:** <https://forum.mautic.org/t/error-and-campaign-update-issue-after-update-to-1-2-3/3113>\
**Category:** Product Support\
**Created:** [December 31, 2015, 10:19pm UTC](https://forum.mautic.org/t/error-and-campaign-update-issue-after-update-to-1-2-3/3113 "2015-12-31T22:19:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![saisiniq](https://avatars.discourse-cdn.com/v4/letter/s/e8c25b/32.png) [@saisiniq](https://forum.mautic.org/u/saisiniq)\
**Post date:** [December 31, 2015, 10:19pm UTC](https://forum.mautic.org/t/error-and-campaign-update-issue-after-update-to-1-2-3/3113/1 "2015-12-31T22:19:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![saisiniq](https://avatars.discourse-cdn.com/v4/letter/s/e8c25b/32.png) [@saisiniq](https://forum.mautic.org/u/saisiniq)\
**Post date:** [December 31, 2015, 10:19pm UTC](https://forum.mautic.org/t/error-and-campaign-update-issue-after-update-to-1-2-3/3113/2 "2015-12-31T22:19:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![gmillard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gmillard/32/5_2.png) [@gmillard](https://forum.mautic.org/u/gmillard)\
**Post date:** [January 1, 2016, 1:32am UTC](https://forum.mautic.org/t/error-and-campaign-update-issue-after-update-to-1-2-3/3113/3 "2016-01-01T01:32:12Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![saisiniq](https://avatars.discourse-cdn.com/v4/letter/s/e8c25b/32.png) [@saisiniq](https://forum.mautic.org/u/saisiniq)\
**Post date:** [January 1, 2016, 1:11pm UTC](https://forum.mautic.org/t/error-and-campaign-update-issue-after-update-to-1-2-3/3113/4 "2016-01-01T13:11:31Z")

</div>

Hi Alan,

Thanks yor your reply!

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

Regards,  
Sai

---

<div class="post-metadata">

**Author:** ![gmillard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gmillard/32/5_2.png) [@gmillard](https://forum.mautic.org/u/gmillard)\
**Post date:** [January 1, 2016, 6:05pm UTC](https://forum.mautic.org/t/error-and-campaign-update-issue-after-update-to-1-2-3/3113/5 "2016-01-01T18:05:14Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [February 2, 2020, 10:54pm UTC](https://forum.mautic.org/t/error-and-campaign-update-issue-after-update-to-1-2-3/3113/6 "2020-02-02T22:54:39Z")

</div>


