XF 2.1 Emojis don't show.

cdub

Well-known member
On my 2.1 site I type in
Code:
:co
and the cool and confused emojis pop up. But no coffee or cow. When I do
Code:
:hot
nothing shows up. Not hotel or hotdog.

Not sure what I have set up wrong on my site.
 
Have you done the following?

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.
 
I added that to the config file and the new emojies are now showing in the editor.

They seem to be working okay, except when a post is saved they cause an error. This happens even with the default style. And the problem goes away if the new emojies are removed from the post.

Code:
XF\Db\Exception: MySQL query error [1366]: Incorrect string value: '\xF0\x9F\xA6\x80\x0A\x0A...' for column 'message' at row 1 in src/XF/Db/AbstractStatement.php at line 217
XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 196
XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 77
XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 89
XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 277
XF\Db\AbstractAdapter->update() in src/XF/Mvc/Entity/Entity.php at line 1457
XF\Mvc\Entity\Entity->_saveToSource() in src/XF/Mvc/Entity/Entity.php at line 1184
XF\Mvc\Entity\Entity->save() in src/XF/Service/Post/Editor.php at line 187
XF\Service\Post\Editor->_save() in src/XF/Service/ValidateAndSavableTrait.php at line 40
XF\Service\Post\Editor->save() in src/XF/Pub/Controller/Post.php at line 135
XF\Pub\Controller\Post->actionEdit() in src/XF/Mvc/Dispatcher.php at line 321
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 248
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 100
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 50
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2177
XF\App->run() in src/XF.php at line 390
XF::runApp() in index.php at line 20
 
I'm not sure why ozzy just quoted part of the manual page on this, because he skipped out the important part which is the database conversion part that is required. That line is only correct with the DB conversion done. See here for more information:

 
Top Bottom