Project

General

Profile

Actions

Bug #84707

closed

Extbase wrongly counting translated objects

Added by Kevin Ditscheid over 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase + l10n
Target version:
-
Start date:
2018-04-12
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.1
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

When doing $this->repository->countBySomeField($fieldValue); the result counting consist of default language records. This is problematic, because - depending on the language overlay mode - the result of $this->repository->findBySomeField($fieldValue); could return a different result set. The method doLanguageAndWorkspaceOverlay could remove non localized records that got included in the counting.
This behavior breaks pagination logic for example, where a general result count must be generated in order of calculating a pagination. It could lead to orphan pages, because the actual resultset of findBy is different then the result of countBy.

Steps to reproduce:

1) Create an extension with domain records and a list view
2) Fetch a result set via $this->repository->findBy and $this->repository->countBy and give them to your view
3) Create a few records in default language
4) Translate some of them (not all!)
5) Call the list view in the translation language and check the results of findBy and countBy


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #32216: OrderBy on translated records doesn't work properlyClosed2011-11-30

Actions
Related to TYPO3 Core - Bug #46939: Behaviour of getObjectCountByQuery and languageClosed2013-04-05

Actions
Actions

Also available in: Atom PDF