Project

General

Profile

Actions

Bug #81141

open

ContentObjectRenderer->getRecords() returns incorrectly sorted records in foreign languages

Added by Sven Radetzky almost 7 years ago. Updated over 1 year ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Localization
Target version:
-
Start date:
2017-05-04
Due date:
% Done:

0%

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

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

Actions #1

Updated by Sven Radetzky almost 7 years ago

  • Description updated (diff)
Actions #2

Updated by Sven Radetzky almost 7 years ago

  • Description updated (diff)
Actions #3

Updated by Richard Haeser over 6 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.

Actions #4

Updated by Tymoteusz Motylewski over 6 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.

Actions #5

Updated by Susanne Moog over 4 years ago

  • Sprint Focus set to On Location Sprint
Actions #6

Updated by Oliver Hader over 1 year ago

  • Sprint Focus deleted (On Location Sprint)
Actions

Also available in: Atom PDF