Skip to content

Commit

Permalink
[BUGFIX] Do not index translations on default language in languages f…
Browse files Browse the repository at this point in the history
…ree mode

With fallbackType: free the index queue contains an entry for each available language. Without this check all the entries are additionally indexed in the default language. They should be only indexed for the language, the record has defined as sys_language_uid.

Fixes #3560
  • Loading branch information
schliesser authored and dkd-kaehm committed Sep 19, 2023
1 parent 22f79b1 commit a4013bd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Classes/IndexQueue/Indexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,14 @@ protected function getItemRecordOverlayed(Item $item, int $language): ?array
) {
return null;
}
// skip translated records for default language within "free content mode"-languages
if ($language === 0
&& isset($languageField)
&& (int)($itemRecord[$languageField] ?? null) !== $language
&& $this->isLanguageInAFreeContentMode($item, (int)($itemRecord[$languageField] ?? null))
) {
return null;
}

$pidToUse = $this->getPageIdOfItem($item);

Expand Down

0 comments on commit a4013bd

Please sign in to comment.