Skip to content

Commit

Permalink
[BUGFIX:BP:11.6] Do not index translations on default language in lan…
Browse files Browse the repository at this point in the history
…guages free 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 TYPO3-Solr#3560
Ports: TYPO3-Solr#3785
  • Loading branch information
schliesser authored and dkd-friedrich committed Sep 20, 2023
1 parent 0e62e18 commit ae64b37
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 ae64b37

Please sign in to comment.