Skip to content

Commit

Permalink
[BUGFIX] NPE in Index Queue module when no site is selected
Browse files Browse the repository at this point in the history
In multi site setups a null pointer exception is thrown when opening the
Index Queue TYPO3 module without having a solr-enabled page selected in
the page tree. The NPE is thrown in `::initializeAction()` before the
original handling of the "no site selected" case in `::indexAction()`.

Fixes: 3ea2713 ("[TASK:BP:11.6] Consider queue initialization status")
  • Loading branch information
adamkoppede authored and dkd-kaehm committed Dec 12, 2024
1 parent 95f13f0 commit 6f58f5f
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,10 @@ protected function addIndexQueueFlashMessage(string $label, int $severity)
*/
protected function getIndexQueues(): array
{
if ($this->selectedSite === null) {
return [];
}

$queues = [];
$configuration = $this->selectedSite->getSolrConfiguration();
foreach ($configuration->getEnabledIndexQueueConfigurationNames() as $indexingConfiguration) {
Expand Down

0 comments on commit 6f58f5f

Please sign in to comment.