Bug #88955

Language restriction is not automatically taken in account with queryBuilder

Added by Florian Rival 4 days ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2019-08-13
Due date:
% Done:

0%

TYPO3 Version:
9
PHP Version:
7.1
Tags:
Typo3 v9.5.8
Complexity:
Is Regression:
Yes
Sprint Focus:

Description

Create a request to get data from a table in a repository :

$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tx_myext_domain_model_table');
$result = $queryBuilder->select('*')
        ->from('tx_myext_domain_model_table')
        ->where(...$conditions)
        ->execute()
        ->fetchAll();

if the table 'tx_myext_domain_model_table' contains translations for other languages (i.e. sys_language_uid > 0) the result returned include the records for all languages while 'sys_language_uid' should have been automatically filtered for the current language.

Also available in: Atom PDF