Skip to content

Commit

Permalink
[BUGFIX] site has no attribte language
Browse files Browse the repository at this point in the history
get SiteLanguage from request instead of site
  • Loading branch information
achimfritz committed Dec 18, 2024
1 parent 31199d2 commit 164f71a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Classes/Event/Indexing/BeforeDocumentsAreIndexedEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 164f71a

Please sign in to comment.