XF 2.1 Serious problems with Smilleys and error "oops, we ran in to some problems"

Antich

Member
I dont know why, nobody in my forum can reply a thread after taking an smilley from bbcode editor. However, if we write manually the code of the smylley " : )" for example, it works good.

I reinstalled all smilleys pack and the problem persists.
Additionally, now if y quote a missage which contains emojis from other users, i can't post it and i have the message "Oops we ran..)

I have this problem in private conversations and in every node..

Thanks
 
If this is an installation which was upgraded from XenForo 1.x then it's very likely you haven't yet converted your database to support emojis, but you have already enabled emoji via your src/config.php file.

You need to follow the process here:
 
If this is an installation which was upgraded from XenForo 1.x then it's very likely you haven't yet converted your database to support emojis, but you have already enabled emoji via your src/config.php file.

You need to follow the process here:
But tecnically i don't use emojis. It is another problem, but i think it is not the same ofthe error I posted.

My users cant use emojis from their phones, it is ok for now. However, they cannot use the smilleys from the box of text editor.

Here i have a console error that i guess would be about that.

Code:
eguimiento
INSERT  INTO `xf_draft` (`user_id`, `draft_key`, `message`, `extra_data`, `draft_id`, `last_update`) VALUES (?, ?, ?, ?, ?, ?)
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 1366, 'HY000')
#1 src/XF/Db/Mysqli/Statement.php(77): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1366, 'HY000')
#2 src/XF/Db/AbstractAdapter.php(94): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(221): XF\Db\AbstractAdapter->query('INSERT  INTO `x...', Array)
#4 src/XF/Mvc/Entity/Entity.php(1452): XF\Db\AbstractAdapter->insert('xf_draft', Array, false)
#5 src/XF/Mvc/Entity/Entity.php(1184): XF\Mvc\Entity\Entity->_saveToSource()
#6 src/XF/Draft.php(44): XF\Mvc\Entity\Entity->save()
#7 src/XF/ControllerPlugin/Draft.php(29): XF\Draft->save()
#8 src/XF/ControllerPlugin/Draft.php(11): XF\ControllerPlugin\Draft->updateMessageDraft(Object(XF\Draft), Array, 'message')
#9 src/XF/Pub/Controller/Conversation.php(418): XF\ControllerPlugin\Draft->actionDraftMessage(Object(XF\Draft), Array)
#10 src/XF/Mvc/Dispatcher.php(350): XF\Pub\Controller\Conversation->actionDraft(Object(XF\Mvc\ParameterBag))
#11 src/XF/Mvc/Dispatcher.php(261): XF\Mvc\Dispatcher->dispatchClass('XF:Conversation', 'Draft', Object(XF\Mvc\RouteMatch), Object(XF\Pub\Controller\Conversation), NULL)
#12 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Pub\Controller\Conversation), NULL)
#13 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#14 src/XF/App.php(2184): XF\Mvc\Dispatcher->run()
#15 src/XF.php(391): XF\App->run()
#16 index.php(20): XF::runApp('XF\\Pub\\App')
#17 {main}

Code:
array(4) {
  ["url"] => string(43) "/forum/index.php?conversations/uuu.32/draft"
  ["referrer"] => string(64) "https://www.motoristes.cat/forum/index.php?conversations/uuu.32/"
  ["_GET"] => array(1) {
    ["conversations/uuu_32/draft"] => string(0) ""
  }
  ["_POST"] => array(9) {
    ["message_html"] => string(11) "<p>😀</p>"
    ["attachment_hash"] => string(32) "d06ece05d59a1d738a3f673f76642c8a"
    ["attachment_hash_combined"] => string(106) "{"type":"conversation_message","context":{"conversation_id":32},"hash":"d06ece05d59a1d738a3f673f76642c8a"}"
    ["last_date"] => string(10) "1585214578"
    ["last_known_date"] => string(1) "0"
    ["_xfRequestUri"] => string(38) "/forum/index.php?conversations/uuu.32/"
    ["_xfWithData"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfResponseType"] => string(4) "json"
  }
}

Thanks
 
If you're referring to these categories in the smilie pop up:

1585222654501.png

All of the ones that appear by default after your default smilie categories (People, Nature, Food etc.) are actually emojis. They are only displaying because you have $config['fullUnicode'] = true; in your config file but your database doesn't support multibyte characters hence the errors that you're seeing.

They are inserted as images, and when being displayed they are displayed as images, but they are stored as the underlying emoji character in the database

You can even see it in the error log:

Code:
["_POST"] => array(9) {
    ["message_html"] => string(11) "<p>😀</p>"

You either need to remove $config['fullUnicode'] = true; from your src/config.php file or you need to convert your database to support emojis as I already directed above.
 
If you're referring to these categories in the smilie pop up:

View attachment 221233

All of the ones that appear by default after your default smilie categories (People, Nature, Food etc.) are actually emojis. They are only displaying because you have $config['fullUnicode'] = true; in your config file but your database doesn't support multibyte characters hence the errors that you're seeing.

They are inserted as images, and when being displayed they are displayed as images, but they are stored as the underlying emoji character in the database

You can even see it in the error log:

Code:
["_POST"] => array(9) {
    ["message_html"] => string(11) "<p>😀</p>"

You either need to remove $config['fullUnicode'] = true; from your src/config.php file or you need to convert your database to support emojis as I already directed above.
Thanks. I deleted it from config php and also from config php default, but the issue persists. I cant post a smilley taked from text editor, and i cannot quote anyone.

I am not sure about how much time is it happening.
 
It's possible that you have a PHP opcode cache running which is still using the original config. You may need to wait some time for the changes to take effect or restart PHP or your webserver.

In the meantime, what is the latest error in the server error log resulting from you trying to post a smilie including the full stack trace and request data?
 
Ok i have the following errors:

Code:
Failed to load resource: the server responded with a status of 403 (Forbidden)
core-compiled.js?_v=d810372d:45 PHP: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access this resource.</p>
</body></html>

defaultAjaxError @ core-compiled.js?_v=d810372d:45
/forum/index.php?conversations/uuu.32/draft:1 Failed to load resource: the server responded with a status of 403 (Forbidden)
DevTools failed to parse SourceMap: chrome-extension://cfhdojbkjhnklbpkdaibdccddilifddb/include.preload.js.map
DevTools failed to parse SourceMap: chrome-extension://cfhdojbkjhnklbpkdaibdccddilifddb/include.postload.js.map
DevTools failed to parse SourceMap: chrome-extension://eakacpaijcpapndcfffdgphdiccmpknp/scripts/content_page.map
 
Ok, that's a separate issue. I'll come back to that shortly...

For now can you re-enable this line in src/config.php:
PHP:
$config['fullUnicode'] = true;
And try your test again but this time see if you get any new logs in the XF server error log and, if you do, post the error, full stack trace and request data.

I'm just trying to ascertain whether you have one issue or two different issues.
 
Ok, in the navigator console:
Code:
jquery-3.4.1.min.js?_v=d810372d:2 POST https://www.motoristes.cat/forum/index.php?conversations/uuu.32/add-reply 403 (Forbidden)
send @ jquery-3.4.1.min.js?_v=d810372d:2
ajax @ jquery-3.4.1.min.js?_v=d810372d:2
ajax @ core-compiled.js?_v=d810372d:43
(anonymous) @ core-compiled.js?_v=d810372d:226
setTimeout (async)
submit @ core-compiled.js?_v=d810372d:226
(anonymous) @ core-compiled.js?_v=d810372d:74
dispatch @ jquery-3.4.1.min.js?_v=d810372d:2
v.handle @ jquery-3.4.1.min.js?_v=d810372d:2
core-compiled.js?_v=d810372d:45 PHP: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access this resource.</p>
</body></html>

defaultAjaxError @ core-compiled.js?_v=d810372d:45
t @ core-compiled.js?_v=d810372d:42
c @ jquery-3.4.1.min.js?_v=d810372d:2
fireWith @ jquery-3.4.1.min.js?_v=d810372d:2
l @ jquery-3.4.1.min.js?_v=d810372d:2
(anonymous) @ jquery-3.4.1.min.js?_v=d810372d:2
load (async)
send @ jquery-3.4.1.min.js?_v=d810372d:2
ajax @ jquery-3.4.1.min.js?_v=d810372d:2
ajax @ core-compiled.js?_v=d810372d:43
(anonymous) @ core-compiled.js?_v=d810372d:226
setTimeout (async)
submit @ core-compiled.js?_v=d810372d:226
(anonymous) @ core-compiled.js?_v=d810372d:74
dispatch @ jquery-3.4.1.min.js?_v=d810372d:2
v.handle @ jquery-3.4.1.min.js?_v=d810372d:2

In Xenforo server logs, don't appear any new error, i don't understand why.

The lasts i have there are:

At 9.43 this morning:

Code:
XF\Db\Exception: MySQL query error [1366]: Incorrect string value: '\xF0\x9F\x98\x80' for column 'message' at row 1 src/XF/Db/AbstractStatement.php:228
Generado por: Roger 26 Mar 2020 a las 09:43
Seguimiento
INSERT  INTO `xf_conversation_message` (`conversation_id`, `user_id`, `username`, `message`, `embed_metadata`, `message_date`, `message_id`, `attach_count`, `ip_id`, `reaction_score`, `reactions`, `reaction_users`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 1366, 'HY000')
#1 src/XF/Db/Mysqli/Statement.php(77): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1366, 'HY000')
#2 src/XF/Db/AbstractAdapter.php(94): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(221): XF\Db\AbstractAdapter->query('INSERT  INTO `x...', Array)
#4 src/XF/Mvc/Entity/Entity.php(1452): XF\Db\AbstractAdapter->insert('xf_conversation...', Array, false)
#5 src/XF/Mvc/Entity/Entity.php(1184): XF\Mvc\Entity\Entity->_saveToSource()
#6 src/XF/Service/Conversation/Replier.php(163): XF\Mvc\Entity\Entity->save(true, false)
#7 src/XF/Service/ValidateAndSavableTrait.php(40): XF\Service\Conversation\Replier->_save()
#8 src/XF/Pub/Controller/Conversation.php(506): XF\Service\Conversation\Replier->save()
#9 src/XF/Mvc/Dispatcher.php(350): XF\Pub\Controller\Conversation->actionAddReply(Object(XF\Mvc\ParameterBag))
#10 src/XF/Mvc/Dispatcher.php(261): XF\Mvc\Dispatcher->dispatchClass('XF:Conversation', 'AddReply', Object(XF\Mvc\RouteMatch), Object(XF\Pub\Controller\Conversation), NULL)
#11 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Pub\Controller\Conversation), NULL)
#12 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#13 src/XF/App.php(2184): XF\Mvc\Dispatcher->run()
#14 src/XF.php(391): XF\App->run()
#15 index.php(20): XF::runApp('XF\\Pub\\App')
#16 {main}
Estat de la solicitud
array(4) {
  ["url"] => string(47) "/forum/index.php?conversations/uuu.32/add-reply"
  ["referrer"] => string(64) "https://www.motoristes.cat/forum/index.php?conversations/uuu.32/"
  ["_GET"] => array(1) {
    ["conversations/uuu_32/add-reply"] => string(0) ""
  }
  ["_POST"] => array(9) {
    ["message_html"] => string(11) "<p>😀</p>"
    ["attachment_hash"] => string(32) "d06ece05d59a1d738a3f673f76642c8a"
    ["attachment_hash_combined"] => string(106) "{"type":"conversation_message","context":{"conversation_id":32},"hash":"d06ece05d59a1d738a3f673f76642c8a"}"
    ["last_date"] => string(10) "1585214578"
    ["last_known_date"] => string(1) "0"
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(38) "/forum/index.php?conversations/uuu.32/"
    ["_xfWithData"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}

And the previous i send you about 9.48:

Code:
XF\Db\Exception: MySQL query error [1366]: Incorrect string value: '\xF0\x9F\x98\x80' for column 'message' at row 1 src/XF/Db/AbstractStatement.php:228
Generado por: Roger 26 Mar 2020 a las 09:48
Seguimiento
INSERT  INTO `xf_draft` (`user_id`, `draft_key`, `message`, `extra_data`, `draft_id`, `last_update`) VALUES (?, ?, ?, ?, ?, ?)
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 1366, 'HY000')
#1 src/XF/Db/Mysqli/Statement.php(77): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1366, 'HY000')
#2 src/XF/Db/AbstractAdapter.php(94): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(221): XF\Db\AbstractAdapter->query('INSERT  INTO `x...', Array)
#4 src/XF/Mvc/Entity/Entity.php(1452): XF\Db\AbstractAdapter->insert('xf_draft', Array, false)
#5 src/XF/Mvc/Entity/Entity.php(1184): XF\Mvc\Entity\Entity->_saveToSource()
#6 src/XF/Draft.php(44): XF\Mvc\Entity\Entity->save()
#7 src/XF/ControllerPlugin/Draft.php(29): XF\Draft->save()
#8 src/XF/ControllerPlugin/Draft.php(11): XF\ControllerPlugin\Draft->updateMessageDraft(Object(XF\Draft), Array, 'message')
#9 src/XF/Pub/Controller/Conversation.php(418): XF\ControllerPlugin\Draft->actionDraftMessage(Object(XF\Draft), Array)
#10 src/XF/Mvc/Dispatcher.php(350): XF\Pub\Controller\Conversation->actionDraft(Object(XF\Mvc\ParameterBag))
#11 src/XF/Mvc/Dispatcher.php(261): XF\Mvc\Dispatcher->dispatchClass('XF:Conversation', 'Draft', Object(XF\Mvc\RouteMatch), Object(XF\Pub\Controller\Conversation), NULL)
#12 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Pub\Controller\Conversation), NULL)
#13 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#14 src/XF/App.php(2184): XF\Mvc\Dispatcher->run()
#15 src/XF.php(391): XF\App->run()
#16 index.php(20): XF::runApp('XF\\Pub\\App')
#17 {main}
Estat de la solicitud
array(4) {
  ["url"] => string(43) "/forum/index.php?conversations/uuu.32/draft"
  ["referrer"] => string(64) "https://www.motoristes.cat/forum/index.php?conversations/uuu.32/"
  ["_GET"] => array(1) {
    ["conversations/uuu_32/draft"] => string(0) ""
  }
  ["_POST"] => array(9) {
    ["message_html"] => string(11) "<p>😀</p>"
    ["attachment_hash"] => string(32) "d06ece05d59a1d738a3f673f76642c8a"
    ["attachment_hash_combined"] => string(106) "{"type":"conversation_message","context":{"conversation_id":32},"hash":"d06ece05d59a1d738a3f673f76642c8a"}"
    ["last_date"] => string(10) "1585214578"
    ["last_known_date"] => string(1) "0"
    ["_xfRequestUri"] => string(38) "/forum/index.php?conversations/uuu.32/"
    ["_xfWithData"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
Yeah so you have two different issues, it seems. Or you have somehow developed a new issue while debugging this one.

I was right - you do need to either convert your database or remove the $config['fullUnicode'] = true; line from src/config.php. I just wanted to doubly make sure.

"Incorrect string value" happens when an emoji character is inserted into a database field that doesn't support multibyte UTF-8.

But, as I say, the issue you have now in the console seems to be separate and very likely unrelated.

This is essentially the other issue:

Code:
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access this resource.</p>
</body></html>

This isn't related to unicode support, but something on your server is responding with a forbidden response. This is unexpected and not coming from XF itself.

It may be some sort of security software on the server such as mod_security or similar. It may be triggering now because it is detecting your repeated testing as some sort of undesirable behaviour. But that would be something you would need to speak with your host about as it is happening outside of XF.
 
Mod security? lol... A year ago i was fighting with my host about it. They are very stricts about it. In that ocasions, they had to be looking their console in the same time i was generating the errors, by give permissions to that action.​
I dont understand their obsession about it... I will speak to them and i will say something to you.​
Thank You so much for your very fastly and dedicated support.​
Roger​
 
Working...

**** mod security.... i have been all the morning reinstalling things and files of smillies, and testing with users. Thank you so much for your time and for your support. If you didn't mention the mod security, i would not relationed it with my issue.
And sorry for my bad english ehheh

Regards!
Roger
 
Top Bottom