Skip to content
Snippets Groups Projects
Commit 98a059e8 authored by Andreas Fernandez's avatar Andreas Fernandez Committed by Benni Mack
Browse files

[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: default avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
parent 5fad4f42
Branches
Tags
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment