Fixed XF\Db\Exception: MySQL query error [1366]: Incorrect string value:

craigForo

Active member
Affected version
2.3.0 beta 7
XF\Db\Exception: MySQL query error [1366]: Incorrect string value: '\xF0\x9F\x90\x88.1...' for column my_xenforo.xf_phrase.phrase_text at row 1 in src/XF/Db/AbstractStatement.php at line 230
XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 198
XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 78
XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 96
XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 219
XF\Db\AbstractAdapter->insert() in src/XF/Mvc/Entity/Entity.php at line 1558
XF\Mvc\Entity\Entity->_saveToSource() in src/XF/Mvc/Entity/Entity.php at line 1290
XF\Mvc\Entity\Entity->save() in src/XF/AddOn/DataType/Phrase.php at line 100
XF\AddOn\DataType\Phrase->importAddOnData() in src/XF/Job/AddOnData.php at line 110
XF\Job\AddOnData->run() in src/XF/Job/Atomic.php at line 40
XF\Job\Atomic->run() in src/XF/Job/Manager.php at line 272
XF\Job\Manager->runJobInternal() in src/XF/Job/Manager.php at line 202
XF\Job\Manager->runJobEntry() in src/XF/Job/Manager.php at line 153
XF\Job\Manager->runUnique() in src/XF/Install/Controller/AbstractController.php at line 24
XF\Install\Controller\AbstractController->manualJobRunner() in src/XF/Install/Controller/Upgrade.php at line 267
XF\Install\Controller\Upgrade->actionRunJob() in src/XF/Mvc/Dispatcher.php at line 352
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 258
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 115
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 57
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2604
XF\App->run() in src/XF.php at line 533
XF::runApp() in install/index.php at line 14
 
Same as here...


 
The link above [error 1054] to a fixed report seems to be a different error though. (I tried the fix for that one and still get the error)
 
Last edited:
This was my bad. We included a new phrase which contains an emoji. You probably have an older XF installation and haven’t yet converted your database to support utf8mb4 (for emoji support).

Converting the database to support this is the quickest way to fix the issue.
 
This was my bad. We included a new phrase which contains an emoji. You probably have an older XF installation and haven’t yet converted your database to support utf8mb4 (for emoji support).

Converting the database to support this is the quickest way to fix the issue.
Was this after 2.3.0 beta 6, as I've had no issues up to and including this version?

My server charset is: UTF-8 Unicode (utf8mb4)
 
Yes, this affects beta 7, and we will address it to support installations that have not yet converted.

Full unicode support was introduced in XF 2.0, but it requires manual conversion when upgrading from XF 1:

Newer installations have it enabled by default (assuming src/config.php was not copied from an installation that has not been converted). The server charset is not as important as the table/column charsets (xf_phrase in this particular instance).
 
Yes, this affects beta 7, and we will address it to support installations that have not yet converted.

Full unicode support was introduced in XF 2.0, but it requires manual conversion when upgrading from XF 1:

Newer installations have it enabled by default (assuming src/config.php was not copied from an installation that has not been converted). The server charset is not as important as the table/column charsets (xf_phrase in this particular instance).
Thanks, very helpful information. Guess I missed that memo. :ROFLMAO:
 
Shout out to @Bob for bringing my attention to the add-on requirements. I disabled my add-ons, and the front end loaded. I updated them, and the front end loaded with add-ons enabled. Solved!
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.3.0 Beta 8).

Change log:
Remove emoji from default phrase value
There may be a delay before changes are rolled out to the XenForo Community.
 
Back
Top Bottom