InvalidArgumentException: Received invalid UTF-8 for string column [message] in src/XF/Mvc/Entity/Entity.php at line 740

kick

Member
Reactions
1
InvalidArgumentException: Received invalid UTF-8 for string column [message] in src/XF/Mvc/Entity/Entity.php at line 740
  1. XF\Mvc\Entity\Entity->_castValueToType() in src/XF/Mvc/Entity/Entity.php at line 618
  2. XF\Mvc\Entity\Entity->set() in src/XF/Mvc/Entity/Entity.php at line 548
  3. XF\Mvc\Entity\Entity->__set() in src/XF/Service/Post/Preparer.php at line 98
  4. XF\Service\Post\Preparer->setMessage() in src/addons/SV/UserEssentials/Repository/ContentMentions.php at line 41
  5. SV\UserEssentials\Repository\ContentMentions->SV\UserEssentials\Repository\{closure}() in src/addons/SV/UserEssentials/Repository/ContentMentions.php at line 270
  6. SV\UserEssentials\Repository\ContentMentions->getContentPreparer() in src/addons/SV/UserEssentials/Repository/ContentMentions.php at line 189
  7. SV\UserEssentials\Repository\ContentMentions->SV\UserEssentials\Repository\{closure}() in src/XF.php at line 478
  8. XF::asVisitor() in src/addons/SV/UserEssentials/Repository/ContentMentions.php at line 209
  9. SV\UserEssentials\Repository\ContentMentions->rebuildContentMentions() in src/addons/SV/UserEssentials/Job/ContentMentionsAll.php at line 123
  10. SV\UserEssentials\Job\ContentMentionsAll->rebuildById() in src/XF/Job/AbstractRebuildJob.php at line 47
  11. XF\Job\AbstractRebuildJob->run() in src/addons/SV/UserEssentials/Job/ContentMentionsAll.php at line 27
  12. SV\UserEssentials\Job\ContentMentionsAll->run() in src/XF/Job/Manager.php at line 253
  13. XF\Job\Manager->runJobInternal() in src/XF/Job/Manager.php at line 195
  14. XF\Job\Manager->runJobEntry() in src/XF/Job/Manager.php at line 79
  15. XF\Job\Manager->runQueue() in src/XF/Admin/Controller/Tools.php at line 139
  16. XF\Admin\Controller\Tools->actionRunJob() in src/XF/Mvc/Dispatcher.php at line 321
  17. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 248
  18. XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 100
  19. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 50
  20. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2178
  21. XF\App->run() in src/XF.php at line 390
  22. XF::runApp() in admin.php at line 13
 
This has happened because a post has invalid UTF-8, the same behaviour may occur if it was edited.

Do you have UTF8mb4 enabled? (This requires a recent version of mysql/mariadb)

If so; Can you check that $config['fullUnicode'] = true; is set in config.php and run php cmd.php xf:convert-utf8mb4 to validate all tables have been converted.
 
Yes
1567183913000.png


Error log:
Code:
#0 src/XF/Mvc/Entity/Entity.php(618): XF\Mvc\Entity\Entity->_castValueToType('[QUOTE="nan0tex...', 'message', 5, Array)
#1 src/XF/Mvc/Entity/Entity.php(548): XF\Mvc\Entity\Entity->set('message', '[QUOTE="nan0tex...')
#2 src/XF/Service/Post/Preparer.php(98): XF\Mvc\Entity\Entity->__set('message', '[QUOTE="nan0tex...')
#3 src/addons/SV/UserEssentials/Repository/ContentMentions.php(41): XF\Service\Post\Preparer->setMessage('[QUOTE="nan0tex...', true, false)
#4 src/addons/SV/UserEssentials/Repository/ContentMentions.php(270): SV\UserEssentials\Repository\ContentMentions->SV\UserEssentials\Repository\{closure}(Object(SV\UserEssentials\XF\Service\Post\Preparer), '[QUOTE="nan0tex...')
#5 src/addons/SV/UserEssentials/Repository/ContentMentions.php(189): SV\UserEssentials\Repository\ContentMentions->getContentPreparer(Array, Object(SV\CollaborativeThreads\XF\Entity\Post))
#6 src/XF.php(478): SV\UserEssentials\Repository\ContentMentions->SV\UserEssentials\Repository\{closure}()
#7 src/addons/SV/UserEssentials/Repository/ContentMentions.php(209): XF::asVisitor(Object(SV\CollaborativeThreads\XF\Entity\User), Object(Closure))
#8 src/addons/SV/UserEssentials/Job/ContentMentionsAll.php(123): SV\UserEssentials\Repository\ContentMentions->rebuildContentMentions('post', 65775)
#9 src/XF/Job/AbstractRebuildJob.php(47): SV\UserEssentials\Job\ContentMentionsAll->rebuildById(65775)
#10 src/addons/SV/UserEssentials/Job/ContentMentionsAll.php(27): XF\Job\AbstractRebuildJob->run(G)
#11 src/XF/Job/Manager.php(253): SV\UserEssentials\Job\ContentMentionsAll->run(G)
#12 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
#13 src/XF/Job/Manager.php(111): XF\Job\Manager->runJobEntry(Array, G)
#14 src/XF/Admin/Controller/Tools.php(120): XF\Job\Manager->runByIds(Array, 8)
#15 src/XF/Mvc/Dispatcher.php(321): XF\Admin\Controller\Tools->actionRunJob(Object(XF\Mvc\ParameterBag))
#16 src/XF/Mvc/Dispatcher.php(248): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Tools), NULL)
#17 src/XF/Mvc/Dispatcher.php(100): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Tools), NULL)
#18 src/XF/Mvc/Dispatcher.php(50): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#19 src/XF/App.php(2178): XF\Mvc\Dispatcher->run()
#20 src/XF.php(390): XF\App->run()
#21 admin.php(13): XF::runApp('XF\\Admin\\App')
#22 {main}

-------------

Previous InvalidArgumentException: Received invalid UTF-8 for string column - src/XF/Mvc/Entity/ValueFormatter.php:126
#0 src/XF/Mvc/Entity/Entity.php(736): XF\Mvc\Entity\ValueFormatter->castValueToType('[QUOTE="nan0tex...', 5, Array)
#1 src/XF/Mvc/Entity/Entity.php(618): XF\Mvc\Entity\Entity->_castValueToType('[QUOTE="nan0tex...', 'message', 5, Array)
#2 src/XF/Mvc/Entity/Entity.php(548): XF\Mvc\Entity\Entity->set('message', '[QUOTE="nan0tex...')
#3 src/XF/Service/Post/Preparer.php(98): XF\Mvc\Entity\Entity->__set('message', '[QUOTE="nan0tex...')
#4 src/addons/SV/UserEssentials/Repository/ContentMentions.php(41): XF\Service\Post\Preparer->setMessage('[QUOTE="nan0tex...', true, false)
#5 src/addons/SV/UserEssentials/Repository/ContentMentions.php(270): SV\UserEssentials\Repository\ContentMentions->SV\UserEssentials\Repository\{closure}(Object(SV\UserEssentials\XF\Service\Post\Preparer), '[QUOTE="nan0tex...')
#6 src/addons/SV/UserEssentials/Repository/ContentMentions.php(189): SV\UserEssentials\Repository\ContentMentions->getContentPreparer(Array, Object(SV\CollaborativeThreads\XF\Entity\Post))
#7 src/XF.php(478): SV\UserEssentials\Repository\ContentMentions->SV\UserEssentials\Repository\{closure}()
#8 src/addons/SV/UserEssentials/Repository/ContentMentions.php(209): XF::asVisitor(Object(SV\CollaborativeThreads\XF\Entity\User), Object(Closure))
#9 src/addons/SV/UserEssentials/Job/ContentMentionsAll.php(123): SV\UserEssentials\Repository\ContentMentions->rebuildContentMentions('post', 65775)
#10 src/XF/Job/AbstractRebuildJob.php(47): SV\UserEssentials\Job\ContentMentionsAll->rebuildById(65775)
#11 src/addons/SV/UserEssentials/Job/ContentMentionsAll.php(27): XF\Job\AbstractRebuildJob->run(G)
#12 src/XF/Job/Manager.php(253): SV\UserEssentials\Job\ContentMentionsAll->run(G)
#13 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
#14 src/XF/Job/Manager.php(111): XF\Job\Manager->runJobEntry(Array, G)
#15 src/XF/Admin/Controller/Tools.php(120): XF\Job\Manager->runByIds(Array, 8)
#16 src/XF/Mvc/Dispatcher.php(321): XF\Admin\Controller\Tools->actionRunJob(Object(XF\Mvc\ParameterBag))
#17 src/XF/Mvc/Dispatcher.php(248): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Tools), NULL)
#18 src/XF/Mvc/Dispatcher.php(100): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Tools), NULL)
#19 src/XF/Mvc/Dispatcher.php(50): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#20 src/XF/App.php(2178): XF\Mvc\Dispatcher->run()
#21 src/XF.php(390): XF\App->run()
#22 admin.php(13): XF::runApp('XF\\Admin\\App')
#23 {main}
 
Next version will have a work-around so this doesn't block the rebuild job; but instead will report the content which broken and move on
 

Users who are viewing this thread

Back
Top