Thread Like Summary
isaac
Total Likes: 1
Original Post (Thread Starter)
by sw55
sw55
I upgraded from 7.5.7 to 7.7.5.

When adding an emoji to a post, I get the following error (see below). A row is actually inserted into the Topics table, but not the Posts table. The Post ID is set to '0' in the topics table, so the post appears in the list of threads but is not actually there.

A user had this problem, so I tested it. I tested it in the old forum as well and in that forum the emoji is just completely stripped out. Maybe because the MySQL / PHP versions are old and can't handle the characters at all.

Perhaps it would be possible to support emojis with the new version and upgraded software, if I simply change the column collation from utf8 to utf8mb4 but.... I don't want to mess up tens of thousands of posts accidentally.

At minimum I would like to handle the error... any suggestion? There is a function that seems to parse the post body but I don't understand it.


Script: addpost.inc.php
Line: 664 (likely different than factory)
SQL Error: Incorrect string value: '\xF0\x9F\x98\x80' for column `ubbv7`.`ubbt_POSTS`.`POST_BODY` at row 1
SQL Error: 1366

Query:

INSERT INTO
ubbt_POSTS
(POST_PARENT_ID, TOPIC_ID, POST_IS_TOPIC, POST_POSTED_TIME, POST_POSTER_IP, POST_SUBJECT, POST_BODY, POST_DEFAULT_BODY, POST_IS_APPROVED, POST_ICON, POST_HAS_POLL, POST_HAS_FILE, POST_MARKUP_TYPE, USER_ID, POST_PARENT_USER_ID, POST_ADD_SIGNATURE, POST_LAST_EDITED_TIME, POST_POSTER_NAME, POST_MD5)
VALUES
(0, 102673, 1, 1697078805, '1.2.3.4', 'test2', 'test2😀', 'test2😀', 1, 'book.gif', '0', '0', 'markup', 1311, 0, 1, 0, 'MyName', '47afa86a41f0abd46a8b67f9f6b485e4')
Liked Replies
by Gizmo
Gizmo
The collation utf8mb4_general_ci on your table is required for emoji support, inserting extended UTF characters into a table that does not support them will cause database issues such as you posted.
1 member likes this
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Version 7.7.5 Images suddenly not displaying
by Stovebolt - 05/04/2024 11:19 AM
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
Who's Online Now
3 members (ahmed047, Nightcrawler, 1 invisible), 566 guests, and 148 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)