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
Ports: #3785
  • Loading branch information
schliesser authored and dkd-kaehm committed Sep 19, 2023
1 parent 282d0d2 commit a0b867e
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 @@ -264,6 +264,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 a0b867e

Please sign in to comment.