[TASK] Add tests for wrong translation behavior of Extbase
Scenario: * a site with another language being configured as "strict" * an Extbase plugin consuming a list of records identified by their respective uid * plugin and records are localized to the site's language Expectation: The plugin receives the UIDs of the original record UIDs having sys_language_uid = 0. The plugin uses a custom Extbase Repository and passes the UIDs as array to a ->in() clause: ``` $query = $this->createQuery(); $query->matching($query->in('uid', [1, 2, 3])); ``` According to the site configuration, Extbase should be able to find these records in the default language and either overlay if translated, or discard them if no translations are available. Actual result: Extbase is not able to find any record and thus returns an empty result set. The identified cause is that Extbase searches the database for the given record UIDs in conjunction with the current language id, returning an empty set by definition. To prove the wrong behavior, tests are added that show the broken behavior, the actual fix will come with another patch in #88137. Resolves: #94694 Related: #88137 Releases: master, 10.4 Change-Id: I9a7a6ec5d1b5cfb82e1fc05365fde6e45df12dfc Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/70192 Tested-by:Anja Leichsenring <aleichsenring@ab-softlab.de> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch> Tested-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Anja Leichsenring <aleichsenring@ab-softlab.de> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Benni Mack <benni@typo3.org>
Showing
- typo3/sysext/extbase/Tests/Functional/Persistence/Fixtures/translated-posts.xml 20 additions, 0 deletions...ests/Functional/Persistence/Fixtures/translated-posts.xml
- typo3/sysext/extbase/Tests/Functional/Persistence/TranslatedSiteContentTest.php 6 additions, 6 deletions...ests/Functional/Persistence/TranslatedSiteContentTest.php
- typo3/sysext/extbase/Tests/Functional/Persistence/TranslationTest.php 104 additions, 9 deletions.../extbase/Tests/Functional/Persistence/TranslationTest.php
Please register or sign in to comment