Mautic Community Forums

Twitter Social Monitor Plugin Error

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.

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 :slight_smile:

1 Like