Review main Merged

70192[TASK] Add tests for wrong translation behavior of Extbase

Andreas Kienast CR +2 V +2 Normal +130 −15 updated 08/03/21, 19:24

Commit message

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.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Anja Leichsenring +1
    • Christian Kuhn +1
  • Verified V +2 Done
    • Benni Mack +2
    • Anja Leichsenring +1
    • Christian Kuhn +1
    • core-ci +1 CI

Issues 2

Files 3

Review log 1623

  1. Andreas Kienast uploaded patch set 1 08/03/21, 07:06

  2. Andreas Kienast uploaded patch set 2 08/03/21, 07:19

  3. core-ci voted on patch set 1 V +1 08/03/21, 07:27 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14034

  4. core-ci voted on patch set 2 V +1 08/03/21, 07:41 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14035

  5. Benni Mack uploaded patch set 3 08/03/21, 12:51

  6. Benni Mack voted on patch set 3 V +1 CR +1 08/03/21, 12:59

  7. core-ci voted on patch set 3 V +1 08/03/21, 13:11 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14046

  8. Andreas Kienast uploaded patch set 4 08/03/21, 13:56

  9. Frank Nägler commented on patch set 4 CR -1 08/03/21, 13:57

    will add more test cases
  10. core-ci voted on patch set 4 V +1 08/03/21, 14:15 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14049

  11. Frank Nägler voted on patch set 4 V +1 CR +1 08/03/21, 15:23

  12. Frank Nägler voted on patch set 4 V -1 08/03/21, 15:25

  13. Andreas Kienast uploaded patch set 5 08/03/21, 15:33

  14. core-ci voted on patch set 5 V -1 08/03/21, 15:55 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14051

  15. Andreas Kienast uploaded patch set 6 08/03/21, 16:10

  16. core-ci voted on patch set 6 V +1 08/03/21, 16:20 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14052

  17. Anja Leichsenring voted on patch set 6 V +1 CR +1 08/03/21, 17:09

  18. Andreas Kienast uploaded patch set 7 08/03/21, 17:51

  19. Anja Leichsenring voted on patch set 7 V +1 CR +1 08/03/21, 17:59

  20. core-ci voted on patch set 7 V +1 08/03/21, 18:15 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14057

  21. Christian Kuhn voted on patch set 7 V +1 CR +1 08/03/21, 18:33

  22. Benni Mack voted on patch set 7 V +2 CR +2 08/03/21, 19:24

  23. Benni Mack merged patch set 8 08/03/21, 19:24