[wp-trac] [WordPress Trac] #60362: Emojis cause "Updating failed. Could not update post in the database." error

WordPress Trac noreply at wordpress.org
Fri Jan 24 20:50:39 UTC 2025


#60362: Emojis cause "Updating failed. Could not update post in the database."
error
-------------------------------------------------+-------------------------
 Reporter:  mikefitzman                          |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  Database                             |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-testing-info needs-testing       |     Focuses:
  needs-screenshots                              |
-------------------------------------------------+-------------------------

Comment (by josklever):

 Today I've spent some time investigating this issue on a website. Some of
 the tables were indeed using utf8mb3 collations, so I changed them to
 utf8mb4_unicode_ci, but no success.

 So I found a code snippet where the `wp_encode_emoji()` function was used
 in a filter to fix this and that works.

 I've saved it as a small plugin: https://github.com/JosKlever/emoji-fix

 This client always used emojis until it didn't work anymore (posts with
 emojis couldn't be saved again.

 Almost at the same time I got a report from another client with the same
 issue. They have the same webhost, so that might be related. I've found
 info on the web about upgrades of database software (in this case MariaDB
 10.6) that might have caused this. But I didn't really understand it
 enough to explain here.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/60362#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list