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

Also available in: Atom PDF