WordPress.org

Make WordPress Core

Opened 10 months ago

Last modified 9 days ago

#49355 new defect (bug)

"Publishing failed. Error message: Could not update post in the database" caused by encoding

Reported by: 1000camels Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.3.2
Component: Posts, Post Types Keywords: needs-patch
Focuses: Cc:

Description

I have some text that I am copying into the title of a post. I get the following error:

"Publishing failed. Error message: Could not update post in the database"

The text is:

𝐀 𝐖𝐢𝐧 𝐟𝐨𝐫 𝐚 𝐉𝐮𝐬𝐭𝐢𝐜𝐞 𝐂𝐞𝐧𝐭𝐫𝐞 𝐂𝐥𝐢𝐞𝐧𝐭!

I am having trouble understanding what encoding this text is.

Why is this failing to save to the database? My database is set to utf8mb4. Why WordPress is choking on it?

Change History (2)

#1 @SergeyBiryukov
10 months ago

  • Component changed from General to Editor

#2 @noisysocks
9 days ago

  • Component changed from Editor to Posts, Post Types
  • Keywords needs-patch added

I created a post with 𝐀 𝐖𝐢𝐧 𝐟𝐨𝐫 𝐚 𝐉𝐮𝐬𝐭𝐢𝐜𝐞 𝐂𝐞𝐧𝐭𝐫𝐞 𝐂𝐥𝐢𝐞𝐧𝐭! as the title and was able to publish it. The post_title looked correct when I looked at the post in phpMyAdmin.

I was not, however, able to preview or view the post. I got a 404 error. It looks like the post_name is URL escaped and that WordPress is choking on finding the post by its slug.

Note: See TracTickets for help on using tickets.