Emoji's in emails causing 500 error

Your software
My Mautic version is: 4.4.5
My PHP version is:7.4.3
My Database type and version is: Maria DB 10.3.34

Your problem
If I create an email with emoji’s I get a 500 internal server error on saving. I have tried both with the grapejs builder and in code mode with the same result.

I have look at my DB and the tables show a mix of utf8_unicode_ci and utf8mb4_unicode_ci for the tables.

The bundle_grapesjsbuilder table is utf8mb4_unicode_ci

The suggested fixes found on this forum say the DB should be utf8mb4 and I when I check it says it the DB is utf8mb4 although it seems that is not the case for all tables.

These errors are showing in the log: none

Steps I have tried to fix the problem: hunting this forum

You are probably using a database that was created a long time ago, before the default charset was changed to utf8mb4. Have you tried converting the email table to utf8mb4? If not, make sure you have a backup of the database in case something goes wrong. Then run this update:

ALTER TABLE `emails`
    CONVERT TO CHARACTER SET utf8mb4
        COLLATE utf8mb4_unicode_ci;
4 Likes