Bug #87407
closedInaccurate count of query results with legacy translation overlay handling
0%
Description
When the legacy translation overlay handling is used (consistentTranslationOverlayHandling = 0
or TYPO3 CMS v8) in conjunction with the language overlay mode 'hideNonTranslated', hidden translations of records will be taken into account when the count of a QueryResult is calculated.
The reason this occurs is that the whitelist of available localizations is selected without checking enableFields in \TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbQueryParser::getSysLanguageStatement:817
. While fetched records will be filtered correctly as they’re passed through \TYPO3\CMS\Frontend\Page\PageRepository::getRecordOverlay
, this does not apply to the calculated count.
Steps to reproduce¶
- Set up an Environment using TYPO3 CMS v9 or v8
- Add a website language
- If using TYPO3 CMS v9, add the following line to your TypoScript setup:
config.tx_extbase.features.consistentTranslationOverlayHandling = 0
- Set
config.sys_language_overlay = hideNonTranslated
- Create some localizable records (e.g. sys_category) and translate them
- Hide some of those translations
- Create some sort of output (plugin, userFunc) which utilizes an Extbase query to fetch all records and displays the count of all records received
- On the translated page you will notice a number which equals the total of your translations, including the hidden ones
Updated by Gerrit Code Review almost 6 years ago
- Status changed from New to Under Review
Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59411
Updated by Gerrit Code Review over 5 years ago
Patch set 2 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59411
Updated by Daniel Goerz about 5 years ago
- Status changed from Under Review to Rejected
We don't change the legacy behaviour of the extbase localization mechanics any more. Please use the new, consistent translation overlay handling in the future.