[BUGFIX] Include Records with "All Languages" in default language 93/59993/3
authorBenni Mack <benni@typo3.org>
Sat, 9 Mar 2019 18:39:05 +0000 (19:39 +0100)
committerBenni Mack <benni@typo3.org>
Tue, 12 Mar 2019 05:39:02 +0000 (06:39 +0100)
Records with "All Languages" (sys_language_uid=-1)
aren't shown in TYPO3 v9 anymore of the default
language.

This happened before in TYPO3 v8 and below,
however setting config.sys_language_overlay = 1
triggered the if() condition to jump into the
selection of fetching 0 and -1 records.

As this setting is removed, the check only
applies when overlays are activated, which
is not necessary in language=0.

Resolves: #86972
Resolves: #87749
Resolves: #87093
Releases: master, 9.5
Change-Id: I9308167aede071125df02b848a26283e3f77b759
Reviewed-on: https://review.typo3.org/c/59993
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Reviewed-by: Benni Mack <benni@typo3.org>
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php

index 82b1636..677625b 100644 (file)
@@ -6587,8 +6587,8 @@ class ContentObjectRenderer implements LoggerAwareInterface
             }
             return $languageQuery;
         }
-        // No overlays = only fetch records given for the requested language
-        return $expressionBuilder->eq($languageField, $languageAspect->getContentId());
+        // No overlays = only fetch records given for the requested language and "all languages"
+        return $expressionBuilder->in($languageField, [$languageAspect->getContentId(), -1]);
     }
 
     /**