Search index rebuild warning

janslu

Member
Hi,

I have just upgraded to Xenforo 2.1 and to a new version of Social Groups (2.0.4) and encountered an error when rebuilding search index. I'm using XFES. Here's the stack:

Code:
Server error log
ErrorException: [E_WARNING] Illegal string offset 'tag' src/XF/Search/IndexRecord.php:69
Wygenerowane przez: Nieznane konto 24 Marzec 2019 o 13:18
Stack trace
#0 src/XF/Search/IndexRecord.php(69): XF::handlePhpError(2, '[E_WARNING] Ill...', '/var/www/hosts/...', 69, Array)
#1 src/addons/Truonglv/Groups/Search/Data/Group.php(62): XF\Search\IndexRecord->indexTags(Array)
#2 src/XF/Search/Search.php(37): Truonglv\Groups\Search\Data\Group->getIndexData(Object(Truonglv\Groups\Entity\Group))
#3 src/XF/Search/Search.php(59): XF\Search\Search->index('tl_group', Object(Truonglv\Groups\Entity\Group))
#4 src/XF/Search/Search.php(85): XF\Search\Search->indexEntities('tl_group', Object(XF\Mvc\Entity\ArrayCollection))
#5 src/XF/Job/SearchRebuild.php(57): XF\Search\Search->indexRange('tl_group', 500, 500)
#6 src/XF/Job/Manager.php(253): XF\Job\SearchRebuild->run(8)
#7 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, 8)
#8 src/XF/Job/Manager.php(146): XF\Job\Manager->runJobEntry(Array, 8)
#9 src/XF/Cli/Command/JobRunnerTrait.php(30): XF\Job\Manager->runUnique('xfRebuildJob-se...', 8)
#10 src/XF/Cli/Command/JobRunnerTrait.php(13): XF\Cli\Command\Rebuild\AbstractRebuildCommand->runJob('xfRebuildJob-se...', Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 src/XF/Cli/Command/Rebuild/AbstractRebuildCommand.php(84): XF\Cli\Command\Rebuild\AbstractRebuildCommand->setupAndRunJob('xfRebuildJob-se...', 'XF:SearchRebuil...', Array, Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 src/vendor/symfony/console/Command/Command.php(255): XF\Cli\Command\Rebuild\AbstractRebuildCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 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))
#14 src/vendor/symfony/console/Application.php(248): Symfony\Component\Console\Application->doRunCommand(Object(XF\Cli\Command\Rebuild\RebuildSearch), 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}
Request state
array(1) {
  ["cli"] => string(25) "cmd.php xf-rebuild:search"
}
Thanks
 

janslu

Member
Hi,
doesn't seem to have problems with other types. I have upgraded forum to 2.1 and to new version of XFES and elastic search (moved from v5 to v6) and ran rebuild search index. It rebuilt posts, threads and other xenforo types successfully and then got stuck on groups.
 

Truonglv

Staff member
Tech Support
Hello.

Can you edit the file. Truonglv/Groups/Search/Data/Group.php at the line 61 and insert below:
PHP:
\Truonglv\Groups\App::logError('Index group with tags: ' . json_encode($entity->tags));
And tell me the errors in Server Errors Log when rebuild search.
 
View previous replies…

janslu

Member
Truonglv
You are right. Fixed. I took a peek inside the db and there's something funny - empty values are represented as '[]' (no quotes, square brackets) but actual non-empty values are json '{"2840":{"tag":"du\u017ca r\u00f3\u017cnica wieku","tag_url":"duza-roznica-wieku"},"2839":{"tag":"trzecie dziecko","tag_url":"trzecie-dziecko"}}' with curly braces.

Thanks.
 

janslu

Member
ErrorException: [E_WARNING] Illegal string offset 'tag' in src/XF/Search/IndexRecord.php at line 69:
Code:
XF::handlePhpError() in src/XF/Search/IndexRecord.php at line 69
XF\Search\IndexRecord->indexTags() in src/addons/Truonglv/Groups/Search/Data/Group.php at line 63
Truonglv\Groups\Search\Data\Group->getIndexData() in src/XF/Search/Search.php at line 37
XF\Search\Search->index() in src/XF/Search/Search.php at line 59
XF\Search\Search->indexEntities() in src/XF/Search/Search.php at line 85
XF\Search\Search->indexRange() in src/XF/Job/SearchRebuild.php at line 57
XF\Job\SearchRebuild->run() in src/XF/Job/Manager.php at line 253
XF\Job\Manager->runJobInternal() in src/XF/Job/Manager.php at line 195
XF\Job\Manager->runJobEntry() in src/XF/Job/Manager.php at line 111
XF\Job\Manager->runByIds() in src/XF/Admin/Controller/Tools.php at line 120
XF\Admin\Controller\Tools->actionRunJob() in src/XF/Mvc/Dispatcher.php at line 321
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 244
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 admin.php at line 13
 

janslu

Member
And admin log shows:
Code:
[tl] Social Groups: Index group with tags: {"26":{"tag":"dobra opieka","tag_url":"dobra-opieka"},"23":{"tag":"dzieci","tag_url":"dzieci"},"21":{"tag":"nauka","tag_url":"nauka"},"24":{"tag":"pociecha","tag_url":"pociecha"},"20":{"tag":"przedszkole","tag_url":"przedszkole"},"16":{"tag":"wychowanie","tag_url":"wychowanie"},"25":{"tag":"wymarzone przedszkole","tag_url":"wymarzone-przedszkole"},"27":{"tag":"zabawa","tag_url":"zabawa"},"22":{"tag":"\u017c\u0142obek","tag_url":"zlobek"}}
Minutę temu src/addons/Truonglv/Groups/App.php:145
[tl] Social Groups: Index group with tags: {"246":{"tag":"brzuszki","tag_url":"brzuszki"},"249":{"tag":"co zabra\u0107","tag_url":"co-zabrac"},"248":{"tag":"lista","tag_url":"lista"},"247":{"tag":"zakupy","tag_url":"zakupy"}}
Minutę temu src/addons/Truonglv/Groups/App.php:145
[tl] Social Groups: Index group with tags: {"935":{"tag":"samotna matka","tag_url":"samotna-matka"}}
Minutę temu src/addons/Truonglv/Groups/App.php:145
[tl] Social Groups: Index group with tags: {"935":{"tag":"samotna matka","tag_url":"samotna-matka"}}
Minutę temu src/addons/Truonglv/Groups/App.php:145
[tl] Social Groups: Index group with tags: {"62":{"tag":"ci\u0105\u017ca","tag_url":"ciaza"},"950":{"tag":"kwietniowa","tag_url":"kwietniowa"},"949":{"tag":"kwietniowemamy","tag_url":"kwietniowemamy"},"31":{"tag":"mama","tag_url":"mama"},"951":{"tag":"mama2017","tag_url":"mama2017"},"952":{"tag":"rodz\u0119w2017","tag_url":"rodzew2017"}}
Minutę temu src/addons/Truonglv/Groups/App.php:145
[tl] Social Groups: Index group with tags: {"975":{"tag":"angielski","tag_url":"angielski"},"980":{"tag":"angielski dla najm\u0142odszych","tag_url":"angielski-dla-najmlodszych"},"403":{"tag":"dla dzieci","tag_url":"dla-dzieci"},"23":{"tag":"dzieci","tag_url":"dzieci"},"981":{"tag":"j\u0119zyki obce","tag_url":"jezyki-obce"},"978":{"tag":"musical babies","tag_url":"musical-babies"},"977":{"tag":"nauka angielskiego","tag_url":"nauka-angielskiego"},"264":{"tag":"zaj\u0119cia","tag_url":"zajecia"},"979":{"tag":"zaj\u0119cia dodatkowe","tag_url":"zajecia-dodatkowe"},"976":{"tag":"zaj\u0119cia j\u0119zykowe","tag_url":"zajecia-jezykowe"}}
Minutę temu src/addons/Truonglv/Groups/App.php:145
[tl] Social Groups: Index group with tags: {"1452":{"tag":"2017","tag_url":"2017"},"1451":{"tag":"czerwiec","tag_url":"czerwiec"},"1450":{"tag":"mamusie","tag_url":"mamusie"},"110":{"tag":"mamy","tag_url":"mamy"}}
Minutę temu src/addons/Truonglv/Groups/App.php:145
[tl] Social Groups: Index group with tags: {"150":{"tag":"mleko modyfikowane","tag_url":"mleko-modyfikowane"}}
Minutę temu src/addons/Truonglv/Groups/App.php:145
[tl] Social Groups: Index group with tags: {"62":{"tag":"ci\u0105\u017ca","tag_url":"ciaza"},"513":{"tag":"dieta odchudzj\u0105ca","tag_url":"dieta-odchudzjaca"},"2658":{"tag":"fitness","tag_url":"fitness"},"1817":{"tag":"nadwaga","tag_url":"nadwaga"},"14":{"tag":"odchudzanie","tag_url":"odchudzanie"}}
Minutę temu src/addons/Truonglv/Groups/App.php:145
[tl] Social Groups: Index group with tags: {"2776":{"tag":"dom","tag_url":"dom"},"23":{"tag":"dzieci","tag_url":"dzieci"},"2775":{"tag":"ko\u015bci\u00f3\u0142","tag_url":"kosciol"},"964":{"tag":"ma\u0142\u017ce\u0144stwo","tag_url":"malzenstwo"},"2779":{"tag":"modlitwa","tag_url":"modlitwa"},"2778":{"tag":"msza \u015bwi\u0119ta","tag_url":"msza-swieta"},"174":{"tag":"rodzice","tag_url":"rodzice"},"116":{"tag":"seks","tag_url":"seks"},"2774":{"tag":"wiara","tag_url":"wiara"},"2777":{"tag":"wsp\u00f3lnota","tag_url":"wspolnota"}}
Minutę temu src/addons/Truonglv/Groups/App.php:145
[tl] Social Groups: Index group with tags: {"2840":{"tag":"du\u017ca r\u00f3\u017cnica wieku","tag_url":"duza-roznica-wieku"},"2839":{"tag":"trzecie dziecko","tag_url":"trzecie-dziecko"}}
Minutę temu src/addons/Truonglv/Groups/App.php:145
[tl] Social Groups: Index group with tags: {"2934":{"tag":"drugie dziecko","tag_url":"drugie-dziecko"},"2932":{"tag":"ojcowie","tag_url":"ojcowie"},"2933":{"tag":"przyszli ojcowie","tag_url":"przyszli-ojcowie"},"2935":{"tag":"przysz\u0142y tata","tag_url":"przyszly-tata"}}
Minutę temu src/addons/Truonglv/Groups/App.php:145
[tl] Social Groups: Index group with tags: {"3213":{"tag":"eugeniosimpson","tag_url":"eugeniosimpson"}}
Minutę temu src/addons/Truonglv/Groups/App.php:145
[tl] Social Groups: Index group with tags: ["#duzarodzina"]
Minutę temu src/addons/Truonglv/Groups/App.php:145
[E_WARNING] Illegal string offset 'tag'
Minutę temu src/XF/Search/IndexRecord.php:69
"Minutę temu" means "a minute ago"
 
Top