Bug #81141
openContentObjectRenderer->getRecords() returns incorrectly sorted records in foreign languages
0%
Description
The issue occurs for example when using the TypoScript CONTENT object:
For example with the following config:
lib.columns.content = CONTENT lib.columns.content { table = tt_content select { where = colPos=0 pidInList = this selectFields = * includeRecordsWithoutDefaultTranslation = 1 orderBy = sorting languageField = sys_language_uid } renderObj =< tt_content }
The order by which the records are sorted is determined only by the executed query in ContentObjectRenderer->getRecords().
Only afterwards the $tsfe->sys_page->versionOL(...) and $tsfe->sys_page->getRecordOverlay(...) functions are called on a per record basis without taking into account that the changed record values could also have changed sorting values.
Therefore, while the records arrive in the frontend with the correct values in the sorting field, they are still sorted by the sorting values of the original records, while "records without default translation" are incorrectly positioned throughout.
Tested against TYPO3 CMS 7.6.18.
Language config:
#### German language, default config { sys_language_uid = 0 sys_language_overlay = hideNonTranslated sys_language_mode = strict language = de locale_all = de_DE.UTF-8 htmlTag_langKey = de } page.meta.language = de #### English language, sys_language.uid = 1 [globalVar = GP:L = 1] config.sys_language_uid = 1 config.language = en config.locale_all = en_GB.UTF-8 config.htmlTag_langKey = en page.meta.language = en [global]
and PageTSConfig:
mod.SHARED { defaultLanguageFlag = de defaultLanguageLabel = Deutsch } mod.web_layout.defLangBinding = 0 mod.web_layout.allowInconsistentLanguageHandling = 1 TCAdefaults.pages.l18n_cfg = 2 TCEFORM.pages.l18n_cfg.disabled = 1
Updated by Richard Haeser about 7 years ago
We have the same issue. Any news on this? I'm aware of the issues with inconsistent language handling and that you shouldn't do that, but in a site with thousands of translated pages, it is hard to go back.
Updated by Tymoteusz Motylewski about 7 years ago
To my knowledge, taking into account original record sorting field is correct (when using sys_language_overlay set to 1 or hideNonTranslated).
If you want to have independent sorting of records in translation you should use sys_language_overlay = 0.
Updated by Susanne Moog almost 5 years ago
- Sprint Focus set to On Location Sprint
Updated by Oliver Hader about 2 years ago
- Sprint Focus deleted (
On Location Sprint)