Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Call to a member function getSolrConfiguration() on null #3769

Closed
eliashaeussler opened this issue Aug 29, 2023 · 0 comments · Fixed by #3770
Closed

[BUG] Call to a member function getSolrConfiguration() on null #3769

eliashaeussler opened this issue Aug 29, 2023 · 0 comments · Fixed by #3770

Comments

@eliashaeussler
Copy link
Contributor

eliashaeussler commented Aug 29, 2023

Describe the bug
When running an upgrade wizard for EXT:container, I run into issues with EXT:solr due to missing site configuration.

Stack trace:

$ vendor/bin/typo3cms container_deleteChildrenWithWrongPid
                                                            
  [ Error ]                                                 
  Call to a member function getSolrConfiguration() on null  
                                                            
Exception trace:
#0 ()
   typo3conf/ext/solr/Classes/Domain/Index/Queue/GarbageRemover/AbstractStrategy.php:118
#1 ApacheSolrForTypo3\Solr\Domain\Index\Queue\GarbageRemover\AbstractStrategy->deleteIndexDocuments()
   typo3conf/ext/solr/Classes/Domain/Index/Queue/GarbageRemover/AbstractStrategy.php:96
#2 ApacheSolrForTypo3\Solr\Domain\Index\Queue\GarbageRemover\AbstractStrategy->deleteInSolrAndUpdateIndexQueue()
   typo3conf/ext/solr/Classes/Domain/Index/Queue/GarbageRemover/PageStrategy.php:50
#3 ApacheSolrForTypo3\Solr\Domain\Index\Queue\GarbageRemover\PageStrategy->collectPageGarbageByContentChange()
   typo3conf/ext/solr/Classes/Domain/Index/Queue/GarbageRemover/PageStrategy.php:32
#4 ApacheSolrForTypo3\Solr\Domain\Index\Queue\GarbageRemover\PageStrategy->removeGarbageOfByStrategy()
   typo3conf/ext/solr/Classes/Domain/Index/Queue/GarbageRemover/AbstractStrategy.php:63
#5 ApacheSolrForTypo3\Solr\Domain\Index\Queue\GarbageRemover\AbstractStrategy->removeGarbageOf()
   typo3conf/ext/solr/Classes/Domain/Index/Queue/UpdateHandler/GarbageHandler.php:78
#6 ApacheSolrForTypo3\Solr\Domain\Index\Queue\UpdateHandler\GarbageHandler->collectGarbage()
   typo3conf/ext/solr/Classes/Domain/Index/Queue/UpdateHandler/EventListener/ImmediateProcessingEventListener.php:138
#7 ApacheSolrForTypo3\Solr\Domain\Index\Queue\UpdateHandler\EventListener\ImmediateProcessingEventListener->handleRecordDeletedEvent()
   typo3conf/ext/solr/Classes/Domain/Index/Queue/UpdateHandler/EventListener/ImmediateProcessingEventListener.php:53
#8 ApacheSolrForTypo3\Solr\Domain\Index\Queue\UpdateHandler\EventListener\ImmediateProcessingEventListener->__invoke()
   typo3/sysext/core/Classes/EventDispatcher/EventDispatcher.php:51
#9 TYPO3\CMS\Core\EventDispatcher\EventDispatcher->dispatch()
   typo3/sysext/adminpanel/Classes/Service/EventDispatcher.php:41
#10 TYPO3\CMS\Adminpanel\Service\EventDispatcher->dispatch()
   typo3conf/ext/solr/Classes/GarbageCollector.php:85
#11 ApacheSolrForTypo3\Solr\GarbageCollector->processCmdmap_preProcess()
   typo3/sysext/core/Classes/DataHandling/DataHandler.php:3156
#12 TYPO3\CMS\Core\DataHandling\DataHandler->process_cmdmap()
   typo3conf/ext/container/Classes/Integrity/IntegrityFix.php:49
#13 B13\Container\Integrity\IntegrityFix->deleteChildrenWithWrongPid()
   typo3conf/ext/container/Classes/Updates/ContainerDeleteChildrenWithWrongPid.php:86
#14 B13\Container\Updates\ContainerDeleteChildrenWithWrongPid->executeUpdate()
   app/vendor/helhum/typo3-console/Classes/Console/Install/Upgrade/UpgradeWizardExecutor.php:67
#15 Helhum\Typo3Console\Install\Upgrade\UpgradeWizardExecutor->executeWizard()
   app/vendor/helhum/typo3-console/Classes/Console/Install/Upgrade/UpgradeHandling.php:142
#16 Helhum\Typo3Console\Install\Upgrade\UpgradeHandling->runWizard()
   app/vendor/helhum/typo3-console/Classes/Console/Install/Upgrade/UpgradeHandling.php:111
#17 Helhum\Typo3Console\Install\Upgrade\UpgradeHandling->runWizards()
   app/vendor/helhum/typo3-console/Classes/Console/Command/Upgrade/UpgradeRunCommand.php:143
#18 Helhum\Typo3Console\Command\Upgrade\UpgradeRunCommand->execute()
   app/vendor/symfony/console/Command/Command.php:298
#19 Symfony\Component\Console\Command\Command->run()
   app/vendor/symfony/console/Application.php:1040
#20 Symfony\Component\Console\Application->doRunCommand()
   app/vendor/helhum/typo3-console/Classes/Console/Mvc/Cli/Symfony/Application.php:189
#21 Helhum\Typo3Console\Mvc\Cli\Symfony\Application->doRunCommand()
   app/vendor/symfony/console/Application.php:301
#22 Symfony\Component\Console\Application->doRun()
   app/vendor/symfony/console/Application.php:171
#23 Symfony\Component\Console\Application->run()
   app/vendor/helhum/typo3-console/Classes/Console/Core/Kernel.php:118
#24 Helhum\Typo3Console\Core\Kernel->handle()
   app/vendor/helhum/typo3-console/Scripts/typo3-console.php:18
#25 {closure}()
   app/vendor/helhum/typo3-console/Scripts/typo3-console.php:20
#26 require()
   app/vendor/helhum/typo3-console/typo3cms:3
#27 include()
   app/vendor/bin/typo3cms:119

Used versions (please complete the following information):

  • TYPO3 Version: 11.5.30
  • Browser: CLI
  • EXT:solr Version: 11.5.3
  • Used Apache Solr Version: not relevant
  • PHP Version: 8.1.21
  • MySQL Version: 8.0.34

Additional context
There's already #3597 which addresses a similar issue, but the related fix is applied to another class. I'll provide a PR to fix the bug in the AbstractStrategy class.

eliashaeussler added a commit to eliashaeussler/ext-solr that referenced this issue Aug 29, 2023
dkd-kaehm added a commit to dkd-kaehm/ext-solr that referenced this issue Sep 11, 2023
dkd-kaehm added a commit to dkd-kaehm/ext-solr that referenced this issue Sep 11, 2023
dkd-friedrich pushed a commit that referenced this issue Sep 20, 2023
dkd-friedrich pushed a commit that referenced this issue Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant