-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Due to MySQL encoding, some emoji may break Mautic #6007
Comments
Running the following SQL against the Mautic database fixes the emoji issue with the Twitter plugin: ALTER TABLE `leads`
CONVERT TO CHARACTER SET utf8mb4
COLLATE utf8mb4_unicode_ci;
ALTER TABLE `leads`
CHANGE social_cache social_cache LONGTEXT
CHARACTER SET utf8mb4; |
Label: Bug |
@npracht Yes, it likely would, if applied to the The 🕒 emoji is a four-byte character, and MySQL's default charset/collection only supports three-byte emoji by default. There would need to be a Doctrine mapping update and relevant migration in a future Mautic update to convert relevant tables to the In the mean time, back up your database (in case this wrecks it), and try running this SQL against it: ALTER TABLE `emails`
CONVERT TO CHARACTER SET utf8mb4
COLLATE utf8mb4_unicode_ci;
ALTER TABLE `emails`
CHANGE plain_text plain_text LONGTEXT
CHARACTER SET utf8mb4;
ALTER TABLE `emails`
CHANGE custom_html custom_html LONGTEXT
CHARACTER SET utf8mb4;
ALTER TABLE `emails`
CHANGE subject subject LONGTEXT
CHARACTER SET utf8mb4; See if that fixes your immediate issue in #5893 |
This is not working for me either against the plug-in or entering an emoji in the twitter name. The table has changed (all now utf8mb4_unicode_ci, except social cache utf8mb4_general_ci) , but it is still erroring with the same error. I have cleared the cache. Any thoughts? Do I need to do anything else |
@spdustin Just wondered if you had any thoughts on this please? |
Any other text columns would have to be changed as well, including whatever column holds the Twitter user's display name. I'm not using Mautic any longer for other reasons; sorry I can't be of more help. This post may offer some needed guidance. Good luck! |
Thanks @spdustin. Great article! |
@nickwild-999 Change the column type to BLOB. Struggled for a few hours with this before I found this: https://stackoverflow.com/questions/39463134/how-to-store-emoji-character-in-mysql-database It worked for me. |
This issue has been mentioned on Mautic Community Forums. There might be relevant details there: https://forum.mautic.org/t/twitter-integration-errors/15427/5 |
Please DO NOT report security vulnerabilities here. Send them to security@mautic.com instead.
What type of report is this:
Description:
MySQL's default encoding for strings is
utf8
, but Mautic's database, tables and columns should be usingutf8mb64
, along withutf8mb4_unicode_ci
collation.See How to support full Unicode in MySQL databases for details on the correct configuration. Fixing this would require a migration of the database, its tables, and any column in which emoji may be stored.
If a bug:
Steps to reproduce:
Log errors:
The text was updated successfully, but these errors were encountered: