# Twitter Social Monitor Plugin Error

**URL:** <https://forum.mautic.org/t/twitter-social-monitor-plugin-error/11208>\
**Category:** Product Support\
**Created:** [September 24, 2019, 10:58am UTC](https://forum.mautic.org/t/twitter-social-monitor-plugin-error/11208 "2019-09-24T10:58:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![altuni](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/altuni/32/663_2.png) [@altuni](https://forum.mautic.org/u/altuni)\
**Post date:** [September 24, 2019, 10:58am UTC](https://forum.mautic.org/t/twitter-social-monitor-plugin-error/11208/1 "2019-09-24T10:58:50Z")

</div>

**Your software**  
My Mautic version is: 2.15.2  
My PHP version is: 7.2.19 (ubuntu)  
MYSQL: 5.7.27

**Your problem**  
My problem is:  
I am using the twitter social monitor plugin over two different installs, both have the same issue.  
They monitor and create social contacts in segments, but frequently and intermittently will stop working and an error is logged. If I run the cron manually, it will identify which social monitor ID is causing the issue. I can remove that monitor and all others will run, until another social monitor ID is afflicted with the same error. I am hoping that someone from this wonderful community might be able to interpret the error and provide some assistance.

These errors are showing in the log:

[Doctrine\DBAL\Exception\SyntaxErrorException]  
An exception occurred while executing ‘SELECT COUNT(l.id) as count FROM ma\_leads l LEFT JOIN ma\_users u ON u.id = l.owner\_id WHERE (l.firstname IN  
()) AND (l.lastname IN ()) AND (l.twitter IS NULL)’:

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL serve  
r version for the right syntax to use near ‘)) AND (l.lastname IN ()) AND (l.twitter IS NULL)’ at line 1

Steps I have tried to fix the problem:

1. I changed database collation method to utf8mb4\_unicode\_ci’;
2. I have updated each table collation to utf8mb4\_unicode\_ci, except for four tables that would not allow me to make the change (ma\_companies)
3. I have converted the character set for each table to uft8mb4
4. I have set up my.cnf with the following:

[client]  
default-character-set = utf8mb4

[mysql]  
default-character-set = utf8mb4

[mysqld]  
character-set-client-handshake = FALSE  
character-set-server = utf8mb4  
collation-server = utf8mb4\_unicode\_ci  
sql\_mode=STRICT\_TRANS\_TABLES,NO\_ZERO\_IN\_DATE,NO\_ZERO\_DATE,ERROR\_FOR\_DIVISION\_BY\_ZERO,NO\_AUTO\_CREATE\_USER,NO\_ENGINE\_SUBSTITUTION  
init-connect=‘SET NAMES utf8mb4’  
init\_connect=‘SET collation\_connection = utf8mb4\_unicode\_ci’

* * *

I’m not sure if it is a bug or a setup issue. If anyone could provide any advice, I’d be very grateful.

---

<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:** [September 25, 2019, 5:24pm UTC](https://forum.mautic.org/t/twitter-social-monitor-plugin-error/11208/2 "2019-09-25T17:24:45Z")

</div>

Hi @altuni and welcome to the Community Forums!

Thank you for taking the time to make a detailed report of the problem you’ve encountered and the steps you’ve taken to try and troubleshoot.

Indeed, it sounds like it might be a bug but let me get someone with a bit more technical experience to take a look before we go ahead and raise it on Github 🙂

---

<div class="post-metadata">

**Author:** ![tancredi](https://avatars.discourse-cdn.com/v4/letter/t/b3f665/32.png) [@tancredi](https://forum.mautic.org/u/tancredi)\
**Post date:** [February 7, 2021, 1:28pm UTC](https://forum.mautic.org/t/twitter-social-monitor-plugin-error/11208/3 "2021-02-07T13:28:55Z")

</div>

hi there,  
just wondering has this been fixed? I’ve been trying to set up this plugin myself and ran into this error  
possibly related?

 ![Screen Shot 2021-01-29 at 6.31.02 PM](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/9/9b5e44c2276114d76991f5eb6ff5094682f56583.png)

---

<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 7, 2021, 2:09pm UTC](https://forum.mautic.org/t/twitter-social-monitor-plugin-error/11208/4 "2021-02-07T14:09:40Z")

</div>

I believe that the Twitter plugin needs to be updated to use the new API changes.

> <https://github.com/mautic/mautic/issues/9042>
>
> Bug Description
> When testing a PR recently I found that I was unable to connect up a Twitter account. I had to...
