XF 2.1 Incorrect string value for column `xf_sv_user_log`.`content_title`

egerci

Member
Hi,
After upgrade to XF2.1 from XF1.5, I get below error.

When member try to change thread title included emoji
  • XF\Db\Exception: MySQL query error [1366]: Incorrect string value: '\xF0\x9F\x98\x90 v...' for column xf_sv_user_log.content_title at row 1
  • src/XF/Db/AbstractStatement.php:217
I have run below query to solve my problem FYI

ALTER TABLE xf_sv_user_log CHANGE content_title content_title VARCHAR(200) CHARACTER SET utf8mb4_general_ci
 
Okay, so you converted the DB, but did you do this step?

After running the script
Once the script has finished its work, open your src/config.php file in a text editor and add the following line to the end of the file:

$config['fullUnicode'] = true;

Your forum will now fully support emoji in user generated content.
 
Yes Sure
I have already made all steps.
and forum supports emoji.

Just xf_sv_user_log.content_title field was utf8. and I have changed to utf8mb4_general_ci. And now it is ok.

I have wrote here because someone else maybe have same problem.

Can you check "xf_sv_user_log.content_title" if it is converted or not? if it was already converted it shows that I made a mistake while I was upgrading. But if it was still utf8 it means this a bug :)
 
Back
Top Bottom