TYPO3-Solr / ext-solr

A TYPO3 extension that integrates the Apache Solr search server with TYPO3 CMS. dkd Internet Service GmbH is developing the extension. Community contributions are welcome. See CONTRIBUTING.md for details.
GNU General Public License v3.0
137 stars 252 forks source link

Indexing of records via scheduler fails: PSR-7 request is missing in ContentObjectRenderer #4222

Open klodeckl opened 1 week ago

klodeckl commented 1 week ago

If indexing via scheduler and records are indexed (e.g. news or fe_users) the following error occurs:

Error details for queue item (uid: 2085, type: fe_users):
1607172972: TYPO3\CMS\Frontend\ContentObject\Exception\ContentRenderingException: PSR-7 request is missing in ContentObjectRenderer. Inject with start(), setRequest() or provide via $GLOBALS['TYPO3_REQUEST']. in /var/www/vendor/typo3/cms-frontend/Classes/ContentObject/ContentObjectRenderer.php:5945
Stack trace:
#0 /var/www/vendor/typo3/cms-frontend/Classes/Typolink/AbstractTypolinkBuilder.php(212): TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->getRequest()
#1 /var/www/vendor/friendsoftypo3/jumpurl/Classes/TypoLink/LinkModifier.php(200): TYPO3\CMS\Frontend\Typolink\AbstractTypolinkBuilder->getTypoScriptFrontendController()
#2 /var/www/vendor/friendsoftypo3/jumpurl/Classes/TypoLink/LinkModifier.php(118): FoT3\Jumpurl\TypoLink\LinkModifier->getTypoScriptFrontendController()
#3 /var/www/vendor/friendsoftypo3/jumpurl/Classes/TypoLink/LinkModifier.php(43): FoT3\Jumpurl\TypoLink\LinkModifier->isEnabled()
#4 /var/www/vendor/typo3/cms-core/Classes/EventDispatcher/EventDispatcher.php(42): FoT3\Jumpurl\TypoLink\LinkModifier->__invoke()
#5 /var/www/vendor/typo3/cms-adminpanel/Classes/Service/EventDispatcher.php(38): TYPO3\CMS\Core\EventDispatcher\EventDispatcher->dispatch()
#6 /var/www/vendor/typo3/cms-frontend/Classes/Typolink/LinkFactory.php(107): TYPO3\CMS\Adminpanel\Service\EventDispatcher->dispatch()
#7 /var/www/vendor/typo3/cms-frontend/Classes/ContentObject/ContentObjectRenderer.php(4524): TYPO3\CMS\Frontend\Typolink\LinkFactory->create()
#8 /var/www/vendor/typo3/cms-frontend/Classes/ContentObject/ContentObjectRenderer.php(4475): TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->createLink()
#9 /var/www/vendor/typo3/cms-frontend/Classes/ContentObject/ContentObjectRenderer.php(2252): TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->typoLink()
#10 /var/www/vendor/typo3/cms-frontend/Classes/ContentObject/ContentObjectRenderer.php(1244): TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->stdWrap_typolink()
#11 /var/www/vendor/typo3/cms-frontend/Classes/ContentObject/TextContentObject.php(44): TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->stdWrap()
#12 /var/www/vendor/typo3/cms-frontend/Classes/ContentObject/ContentObjectRenderer.php(709): TYPO3\CMS\Frontend\ContentObject\TextContentObject->render()
#13 /var/www/vendor/typo3/cms-frontend/Classes/ContentObject/ContentObjectRenderer.php(656): TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->render()
#14 /var/www/vendor/typo3/cms-frontend/Classes/ContentObject/ContentObjectRenderer.php(1440): TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->cObjGetSingle()
#15 /var/www/vendor/typo3/cms-frontend/Classes/ContentObject/ContentObjectRenderer.php(1244): TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->stdWrap_cObject()
#16 /var/www/vendor/typo3/cms-frontend/Classes/ContentObject/ContentObjectRenderer.php(1223): TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->stdWrap()
#17 /var/www/vendor/typo3/cms-frontend/Classes/ContentObject/TextContentObject.php(44): TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->stdWrap()
#18 /var/www/vendor/typo3/cms-frontend/Classes/ContentObject/ContentObjectRenderer.php(709): TYPO3\CMS\Frontend\ContentObject\TextContentObject->render()
#19 /var/www/vendor/typo3/cms-frontend/Classes/ContentObject/ContentObjectRenderer.php(656): TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->render()
#20 /var/www/vendor/apache-solr-for-typo3/solr/Classes/IndexQueue/AbstractIndexer.php(132): TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->cObjGetSingle()
#21 /var/www/vendor/apache-solr-for-typo3/solr/Classes/IndexQueue/AbstractIndexer.php(78): ApacheSolrForTypo3\Solr\IndexQueue\AbstractIndexer->resolveFieldValue()
#22 /var/www/vendor/apache-solr-for-typo3/solr/Classes/IndexQueue/Indexer.php(383): ApacheSolrForTypo3\Solr\IndexQueue\AbstractIndexer->addDocumentFieldsFromTyposcript()
#23 /var/www/vendor/apache-solr-for-typo3/solr/Classes/IndexQueue/Indexer.php(155): ApacheSolrForTypo3\Solr\IndexQueue\Indexer->itemToDocument()
#24 /var/www/vendor/apache-solr-for-typo3/solr/Classes/IndexQueue/Indexer.php(123): ApacheSolrForTypo3\Solr\IndexQueue\Indexer->indexItem()
#25 /var/www/vendor/apache-solr-for-typo3/solr/Classes/Domain/Index/IndexService.php(156): ApacheSolrForTypo3\Solr\IndexQueue\Indexer->index()
#26 /var/www/vendor/apache-solr-for-typo3/solr/Classes/Domain/Index/IndexService.php(101): ApacheSolrForTypo3\Solr\Domain\Index\IndexService->indexItem()
#27 /var/www/vendor/apache-solr-for-typo3/solr/Classes/Task/IndexQueueWorkerTask.php(65): ApacheSolrForTypo3\Solr\Domain\Index\IndexService->indexItems()
#28 /var/www/vendor/typo3/cms-scheduler/Classes/Scheduler.php(175): ApacheSolrForTypo3\Solr\Task\IndexQueueWorkerTask->execute()
#29 /var/www/vendor/typo3/cms-scheduler/Classes/Command/SchedulerCommand.php(241): TYPO3\CMS\Scheduler\Scheduler->executeTask()
#30 /var/www/vendor/typo3/cms-scheduler/Classes/Command/SchedulerCommand.php(182): TYPO3\CMS\Scheduler\Command\SchedulerCommand->executeOrStopTask()
#31 /var/www/vendor/typo3/cms-scheduler/Classes/Command/SchedulerCommand.php(116): TYPO3\CMS\Scheduler\Command\SchedulerCommand->loopTasks()
#32 /var/www/vendor/symfony/console/Command/Command.php(279): TYPO3\CMS\Scheduler\Command\SchedulerCommand->execute()
#33 /var/www/vendor/symfony/console/Application.php(1047): Symfony\Component\Console\Command\Command->run()
#34 /var/www/vendor/symfony/console/Application.php(316): Symfony\Component\Console\Application->doRunCommand()
#35 /var/www/vendor/symfony/console/Application.php(167): Symfony\Component\Console\Application->doRun()
#36 /var/www/vendor/typo3/cms-core/Classes/Console/CommandApplication.php(112): Symfony\Component\Console\Application->run()
#37 /var/www/vendor/typo3/cms-cli/typo3(23): TYPO3\CMS\Core\Console\CommandApplication->run()
#38 /var/www/vendor/typo3/cms-cli/typo3(24): {closure}()
#39 /var/www/vendor/bin/typo3(119): include('...')
#40 {main}

If indexing via the index queue backend module (not scheduler) it works without errors.

TYPO3 12.4.23 composer mode ext solr 12.0.5 PHP 8.2

klodeckl commented 4 days ago

Update: it seems it makes no difference if executed via scheduler or via index queue backend module. I can’t figure out when the error occurs: one time an indexing record fails and the same record indexed again works.