Before, using MariaDB 10.5 and mysqli, I had plenty of old WordPress website on utf8mb3 tables where I can successfully save a wide range of Emojis in the database.
Now since I switched to MariaDB 10.6 and nd_mysqli, if the database and tables are not converted to utf8mb4, WordPress cannot save anymore the old post that already contain emojis…
It's time consuming to troubleshoot it for WordPress users as this happen without any notice in the Apache error_log or WordPress debug.log. No explicit error is showed by WordPress in Classic Editor: the edit post form is just refreshing and the content is lost. Or in the Block Editor, the error is "Updating failed. Error message : Could not update post in the database" and/or an Error 500 can be showed in the browser Console, with no logs in the server.
The most frustrating for the users is that, old WordPress websites, with old tables in utf8mb3, before successfully stored emojis in old content… and then, overnight (after the server update), the same old WordPress website cannot save content with emojis anymore.
I have tried to change the MariaDB old_mode which is supposed to be empty, like this in the my.cnf :
old_mode=""
From MariaDB 10.6, utf8 is by default an alias for utf8mb3, but I guess this can be changed to ut8mb4 by changing the default value of the old_mode system variable by an empty value (more info about utf8 alias in the MariaDB unicode doc).
But it does not work… emojis still don't save in utf8mb3 tables as it works before.
• I can understand that utf8mb3 do not suit for emojis.
But…
• I cannot understand why so much old WordPress websites created in the past with utf8mb3 tables have old content with plenty emojis stored inside, that are displaying properly in the frontend and backend without being replaced by a ??? sign.
Just saving is now impossible now.
What is this new behaviour?