XF 2.1 Received invalid UTF-8 for string column [message]

Earl

Well-known member
Importing from vb 3.8 to XF v2.1.1
Server Error log 1:

InvalidArgumentException: Received invalid UTF-8 for string column [message] . src/XF/Import/Data/EntityEmulator.php:155

Stack trace
Code:
#0 src/XF/Import/Data/AbstractEmulatedData.php(35): XF\Import\Data\EntityEmulator->set('message', '[QUOTE="ravinat...', Array)
#1 src/addons/XFI/Import/Importer/vBulletin.php(3197): XF\Import\Data\AbstractEmulatedData->set('message', '[QUOTE="ravinat...', Array)
#2 src/XF/Import/Runner.php(231): XFI\Import\Importer\vBulletin->stepPosts(Object(XF\Import\StepState), Array, 8)
#3 src/XF/Import/ParallelRunner.php(212): XF\Import\Runner->runStep('posts', Object(XF\Import\StepState), 8)
#4 src/XF/Cli/Command/ImportChildProcess.php(78): XF\Import\ParallelRunner->runChildProcess('posts', 1293000, 1296000, Object(Closure))
#5 src/vendor/symfony/console/Command/Command.php(255): XF\Cli\Command\ImportChildProcess->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 src/vendor/symfony/console/Application.php(953): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 src/vendor/symfony/console/Application.php(248): Symfony\Component\Console\Application->doRunCommand(Object(XF\Cli\Command\ImportChildProcess), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 src/vendor/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 src/XF/Cli/Runner.php(63): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 cmd.php(15): XF\Cli\Runner->run()
#11 {main}

----
Code:
Previous InvalidArgumentException: Received invalid UTF-8 for string column - src/XF/Mvc/Entity/ValueFormatter.php:126
#0 src/XF/Import/Data/EntityEmulator.php(151): XF\Mvc\Entity\ValueFormatter->castValueToType('[QUOTE="ravinat...', 5, Array)
#1 src/XF/Import/Data/AbstractEmulatedData.php(35): XF\Import\Data\EntityEmulator->set('message', '[QUOTE="ravinat...', Array)
#2 src/addons/XFI/Import/Importer/vBulletin.php(3197): XF\Import\Data\AbstractEmulatedData->set('message', '[QUOTE="ravinat...', Array)
#3 src/XF/Import/Runner.php(231): XFI\Import\Importer\vBulletin->stepPosts(Object(XF\Import\StepState), Array, 8)
#4 src/XF/Import/ParallelRunner.php(212): XF\Import\Runner->runStep('posts', Object(XF\Import\StepState), 8)
#5 src/XF/Cli/Command/ImportChildProcess.php(78): XF\Import\ParallelRunner->runChildProcess('posts', 1293000, 1296000, Object(Closure))
#6 src/vendor/symfony/console/Command/Command.php(255): XF\Cli\Command\ImportChildProcess->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 src/vendor/symfony/console/Application.php(953): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 src/vendor/symfony/console/Application.php(248): Symfony\Component\Console\Application->doRunCommand(Object(XF\Cli\Command\ImportChildProcess), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 src/vendor/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 src/XF/Cli/Runner.php(63): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 cmd.php(15): XF\Cli\Runner->run()
#12 {main}

Request state
Code:
array(1) {
  ["cli"] => string(89) "/usr/local/lsws/site/public_html/cmd.php xf:import-child-process posts 1293000 1296000"
}

Server Error log 2:
RuntimeException: Child process exited with code 1. See control panel error error logs for details. src/XF/Import/ParallelProcessManager.php:170
Stack trace
Code:
#0 src/XF/Import/ParallelRunner.php(55): XF\Import\ParallelProcessManager->execute(Object(XF\Import\Manager), Object(Closure))
#1 src/XF/Import/Runner.php(128): XF\Import\ParallelRunner->runUntilCompleteInternal(Object(XF\Import\Manager), Object(Closure))
#2 src/XF/Cli/Command/Import.php(144): XF\Import\Runner->runUntilComplete(Object(XF\Import\Manager), Object(Closure))
#3 src/vendor/symfony/console/Command/Command.php(255): XF\Cli\Command\Import->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 src/vendor/symfony/console/Application.php(953): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 src/vendor/symfony/console/Application.php(248): Symfony\Component\Console\Application->doRunCommand(Object(XF\Cli\Command\Import), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 src/vendor/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 src/XF/Cli/Runner.php(63): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 cmd.php(15): XF\Cli\Runner->run()
#9 {main}

Request state
Code:
array(1) {
  ["cli"] => string(31) "cmd.php xf:import --processes=7"
}

mI3puMTl.png
 
Last edited:
That question sounds like it might be better on the Lightspeed forum.

I don't personally have a lot of experience with it, and we can really only provide support with the software itself so hopefully posting on their forums will yield some advice.
Hi Chris,

I'm having the same problem but with attachments. Any ideas?
1590593855094.webp
 
The content of the post which triggers the error is this the following:

Code:
[CENTER][B]Invitiamo a leggere tutto il thread composto da 3 post distinti.[/B]
[/CENTER]

Cari amici,

nelle ultime settimane avrete notato (spero) numerose novità che hanno arricchito. Il tutto è stato fatto per proporre un concetto di condivisione moderno, con approccio stile SOCIAL NETWORK.

Una [B]rete sociale[/B] (in inglese [I][B]social network[/B][/I]) consiste di un qualsiasi gruppo di individui connessi tra loro da diversi legami sociali.

[ATTACH=CONFIG]79536[/ATTACH]

Tutto va nella direzione dell'articolo 1 della [URL="domain.com/misc.php?do=showrules"]policy[/URL] del sito ovvero:


[QUOTE][B]1.a[/B] e' la piattaforma gratuita per  fruitori di servizi di accompagnamento ed intrattenimento per adulti. Lo  scopo del sito e' quello di mettere in contatto persone con la stessa  passione e gli stessi interessi al fine di promuovere la socializzazione  e il libero scambio di informazioni fra persone adulte e consenzienti  nel rispetto delle leggi vigenti e dei diritti costituzionalmente  garantiti. In quanto tale, questo servizio si rivolge ad un pubblico  riconosciuto come adulto nel paese di residenza (p.e. in Italia maggiore  di anni 18).[/QUOTE]

Sono giunti moltissimi apprezzamenti per le modifiche di carattere estetico. Avete dimostrato un intenso interesse per la  [URL="http://domain.com/nuova-chat-forum-vt122086.html"]CHAT[/URL] che sta consentendo a molti di voi di incrementare il numero di contatti e di amicizie.

Vediamo ora quanto si sta facendo in tema di SOCIAL NETWORK.

Partiamo dal logo

[ATTACH=CONFIG]79537[/ATTACH]

Come in tutti i social network, per farsi conoscere è indispensabile avere una identità seppur virtuale. Per fare ciò, è necessario [B]IMPOSTARE IL PROFILO PERSONALE[/B] .

[ATTACH=CONFIG]79538[/ATTACH]

Da qui si accede alla propria pagina personalizzata all'interno della quale è possibile inserire tutti gli elementi che vogliamo (o non vogliamo) rendere visibili dagli altri utenti.

[B]Nel prossimi post i dettagli delle varie opzioni disponibili.[/B]

I was able to get the postid by inserting
Code:
\XF::dump($attachment['postid']);
above this line:
Code:
/** @var \XF\Import\Data\Attachment $import */
1590645912235.webp

The error on the XF admin panel is the following:
Code:
InvalidArgumentException: Received invalid UTF-8 for string column [message] src/XF/Mvc/Entity/Entity.php:740
Generated by: Unknown account May 28, 2020 at 3:10 AM
Stack trace
#0 src/XF/Mvc/Entity/Entity.php(618): XF\Mvc\Entity\Entity->_castValueToType('[CENTER][B]Invi...', 'message', 5, Array)
#1 src/XF/Mvc/Entity/Entity.php(548): XF\Mvc\Entity\Entity->set('message', '[CENTER][B]Invi...')
#2 src/addons/XFI/Import/Importer/vBulletin.php(3487): XF\Mvc\Entity\Entity->__set('message', '[CENTER][B]Invi...')
#3 src/XF/Import/Data/Attachment.php(101): XFI\Import\Importer\vBulletin->rewriteEmbeddedAttachments(Object(XF\Entity\Post), Object(XF\Entity\Attachment), 79537, Array)
#4 src/XF/Import/Data/AbstractData.php(136): XF\Import\Data\Attachment->postSave(79537, 79537)
#5 src/addons/XFI/Import/Importer/vBulletin.php(3913): XF\Import\Data\AbstractData->save(79537)
#6 src/XF/Import/Runner.php(231): XFI\Import\Importer\vBulletin->stepAttachments(Object(XF\Import\StepState), Array, 8)
#7 src/XF/Import/Runner.php(59): XF\Import\Runner->runStep('attachments', Object(XF\Import\StepState), 8)
#8 src/XF/Import/Runner.php(151): XF\Import\Runner->run()
#9 src/XF/Import/Runner.php(128): XF\Import\Runner->runUntilCompleteInternal(Object(XF\Import\Manager), Object(Closure))
#10 src/XF/Cli/Command/Import.php(144): XF\Import\Runner->runUntilComplete(Object(XF\Import\Manager), Object(Closure))
#11 src/vendor/symfony/console/Command/Command.php(255): XF\Cli\Command\Import->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 src/vendor/symfony/console/Application.php(982): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 src/vendor/symfony/console/Application.php(255): Symfony\Component\Console\Application->doRunCommand(Object(XF\Cli\Command\Import), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 src/vendor/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 src/XF/Cli/Runner.php(63): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 cmd.php(15): XF\Cli\Runner->run()
#17 {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('[CENTER][B]Invi...', 5, Array)
#1 src/XF/Mvc/Entity/Entity.php(618): XF\Mvc\Entity\Entity->_castValueToType('[CENTER][B]Invi...', 'message', 5, Array)
#2 src/XF/Mvc/Entity/Entity.php(548): XF\Mvc\Entity\Entity->set('message', '[CENTER][B]Invi...')
#3 src/addons/XFI/Import/Importer/vBulletin.php(3487): XF\Mvc\Entity\Entity->__set('message', '[CENTER][B]Invi...')
#4 src/XF/Import/Data/Attachment.php(101): XFI\Import\Importer\vBulletin->rewriteEmbeddedAttachments(Object(XF\Entity\Post), Object(XF\Entity\Attachment), 79537, Array)
#5 src/XF/Import/Data/AbstractData.php(136): XF\Import\Data\Attachment->postSave(79537, 79537)
#6 src/addons/XFI/Import/Importer/vBulletin.php(3913): XF\Import\Data\AbstractData->save(79537)
#7 src/XF/Import/Runner.php(231): XFI\Import\Importer\vBulletin->stepAttachments(Object(XF\Import\StepState), Array, 8)
#8 src/XF/Import/Runner.php(59): XF\Import\Runner->runStep('attachments', Object(XF\Import\StepState), 8)
#9 src/XF/Import/Runner.php(151): XF\Import\Runner->run()
#10 src/XF/Import/Runner.php(128): XF\Import\Runner->runUntilCompleteInternal(Object(XF\Import\Manager), Object(Closure))
#11 src/XF/Cli/Command/Import.php(144): XF\Import\Runner->runUntilComplete(Object(XF\Import\Manager), Object(Closure))
#12 src/vendor/symfony/console/Command/Command.php(255): XF\Cli\Command\Import->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 src/vendor/symfony/console/Application.php(982): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 src/vendor/symfony/console/Application.php(255): Symfony\Component\Console\Application->doRunCommand(Object(XF\Cli\Command\Import), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 src/vendor/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 src/XF/Cli/Runner.php(63): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 cmd.php(15): XF\Cli\Runner->run()
#18 {main}
 
If you believe there is still a bug in the importer, create a thread here so the developers are aware: https://xenforo.com/community/forums/importer-bugs/
A user already reported it is broken:

Should I create again a new bug report?
 
Top Bottom