Project

General

Profile

Actions

Bug #87407

closed

Inaccurate count of query results with legacy translation overlay handling

Added by Getdesigned GmbH over 5 years ago. Updated over 4 years ago.

Status:
Rejected
Priority:
Should have
Category:
Extbase + l10n
Target version:
-
Start date:
Due date:
% Done:

0%

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

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

  1. Set up an Environment using TYPO3 CMS v9 or v8
  2. Add a website language
  3. If using TYPO3 CMS v9, add the following line to your TypoScript setup: config.tx_extbase.features.consistentTranslationOverlayHandling = 0
  4. Set config.sys_language_overlay = hideNonTranslated
  5. Create some localizable records (e.g. sys_category) and translate them
  6. Hide some of those translations
  7. Create some sort of output (plugin, userFunc) which utilizes an Extbase query to fetch all records and displays the count of all records received
  8. On the translated page you will notice a number which equals the total of your translations, including the hidden ones
Actions

Also available in: Atom PDF