Project

General

Profile

Actions

Task #94694

closed

Add test cases for Extbase having a wrong translation handling

Added by Andreas Kienast over 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2021-08-03
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

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 should be added that show the broken behavior, the actual fix will come with another patch in #88137.

Actions

Also available in: Atom PDF