Review 10.4 Merged

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

Benni Mack CR +2 V +2 Normal +130 −15 updated 08/04/21, 10:21

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

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 2

Files 3