Bug #84707
closedExtbase wrongly counting translated objects
0%
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
Updated by Kevin Ditscheid over 6 years ago
- Related to Bug #32216: OrderBy on translated records doesn't work properly added
Updated by Wouter Wolters over 6 years ago
- Assignee deleted (
Tymoteusz Motylewski)
Updated by Tymoteusz Motylewski about 6 years ago
- Status changed from New to Needs Feedback
Please check if the patch https://review.typo3.org/#/c/53974/ solves the issue for you (with overlayMode set to false).
Updated by Tymoteusz Motylewski about 6 years ago
- Related to Bug #46939: Behaviour of getObjectCountByQuery and language added
Updated by Riccardo De Contardi almost 6 years ago
The patch https://review.typo3.org/#/c/53974/ has been merged as far as I have understood. Can this issue be considered closed? Could you perform a test, please?
Thank you!
Updated by Riccardo De Contardi over 5 years ago
- Status changed from Needs Feedback to Closed
No feedback since the last 90 days =>closing.
If you think that this is the wrong decision or experience this issue again, please reopen it or open a new issue with a reference to this one.
Thank you.