Make WordPress Core

Opened 5 years ago

Last modified 15 months ago

#49355 new defect (bug)

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

Reported by: 1000camels's profile 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 (3)

#1 @SergeyBiryukov
5 years ago

  • Component changed from General to Editor

#2 @noisysocks
4 years 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.

#3 @Presskopp
15 months ago

Works for me using the block editor aka Gutenberg and the classic editor as well. Only the slug is shortened to 𝐀-𝐖𝐢𝐧-𝐟𝐨𝐫-𝐚-𝐉𝐮𝐬𝐭𝐢𝐜𝐞-𝐂/ in both cases

Note: See TracTickets for help on using tickets.