Solve the problem that the Z-Blog sidebar module cannot be updated due to the release of Emoji emoticons

skill 3 years ago Lao Li next door Last edited on 2021-04-19 08:49:34

It was said that one day I suddenly found that the latest message module on the side bar of this blog was not updated, and I was puzzled. Finally, I restored the data backup of the previous day.

Today, I found that it was not updated again. I recalled that the only thing I did between updating and not updating was to reply to a message containing Emoji's expression.

So I deleted this reply, updated the cache, and the sidebar began to update normally.

It suddenly dawned on me, because Emoji's expression requires a database code of utf8mb4, while this blog's database code is utf8 (utf8mb3).

As a result, Emoji expressions cannot be saved.

according to ZB Official Document Explain that this is Mysql A BUG of.

At the beginning, I changed the sorting rules of the post article table and its fields, the comment comment table and its fields to utf8mb4_general_ci because I could not send Emoji expressions. After the change, the article and comment can send Emoji expressions, but the collation of the module table has not been modified.

As a result, the module content cannot be displayed correctly after the Emoji emoticon is released.

It is easy to find the root cause of the problem and solve it.

Use phpmyadmin or other database management tools, find the zbp_module, and change its collation to utf8mb4_general_ci.

 Solve the problem that the Z-Blog sidebar module cannot be updated due to the release of Emoji emoticons Page 1

Change the collation of the mod_Content field of the zbp_module to utf8mb4_general_ci.

 Solve the problem that the Z-Blog sidebar module cannot be updated due to the release of Emoji emoticons Page 2

You can also select Change the collation of all columns when changing the collation of the zbp_module table, so that the collation of all related fields under this table will be modified.

 Solve the problem that the Z-Blog sidebar module cannot be updated due to the release of Emoji emoticons Page 3

 Solve the problem that the Z-Blog sidebar module cannot be updated due to the release of Emoji emoticons Page 4

Take a look at the sidebar module. It's normal!

 Solve the problem that the Z-Blog sidebar module cannot be updated due to the release of Emoji emoticons Page 5

Add, I don't know whether it is because of the different versions of MySQL. The back column module of Emoji emoticons published on another MySQL version 5.5 website will not be updated, but will display a bunch of "?"???


This article is written by@ Lao Li next door Published on April 16, 2021 on Yeluzi Blog , unless otherwise specified, all articles in this blog are original, please retain the source for reprinting.
comment (1)
 visitor
 Lao Li next door
🤔 Leave a message just to test the sidebar module 😾😿
· From Qingdao, Shandong Province · reply
Top