diff --git a/Classes/Event/Indexing/AfterPageDocumentIsCreatedForIndexingEvent.php b/Classes/Event/Indexing/AfterPageDocumentIsCreatedForIndexingEvent.php index 9b7ccec55..435d301db 100644 --- a/Classes/Event/Indexing/AfterPageDocumentIsCreatedForIndexingEvent.php +++ b/Classes/Event/Indexing/AfterPageDocumentIsCreatedForIndexingEvent.php @@ -76,7 +76,7 @@ public function getSite(): Site */ public function getSiteLanguage(): SiteLanguage { - return $this->getSite()->getAttribute('language'); + return clone $this->tsfe->cObj->getRequest()->getAttribute('language'); } public function getRecord(): array diff --git a/Classes/Event/Indexing/BeforeDocumentIsProcessedForIndexingEvent.php b/Classes/Event/Indexing/BeforeDocumentIsProcessedForIndexingEvent.php index 39c8b7f66..38e7baea1 100644 --- a/Classes/Event/Indexing/BeforeDocumentIsProcessedForIndexingEvent.php +++ b/Classes/Event/Indexing/BeforeDocumentIsProcessedForIndexingEvent.php @@ -59,7 +59,7 @@ public function getSite(): Site */ public function getSiteLanguage(): SiteLanguage { - return clone $this->getSite()->getAttribute('language'); + return clone $this->tsfe->cObj->getRequest()->getAttribute('language'); } public function getIndexQueueItem(): Item diff --git a/Classes/Event/Indexing/BeforeDocumentsAreIndexedEvent.php b/Classes/Event/Indexing/BeforeDocumentsAreIndexedEvent.php index 686c61d39..71847afb8 100644 --- a/Classes/Event/Indexing/BeforeDocumentsAreIndexedEvent.php +++ b/Classes/Event/Indexing/BeforeDocumentsAreIndexedEvent.php @@ -53,7 +53,7 @@ public function getSite(): Site */ public function getSiteLanguage(): SiteLanguage { - return clone $this->getSite()->getAttribute('language'); + return clone $this->tsfe->cObj->getRequest()->getAttribute('language'); } public function getIndexQueueItem(): Item