Project

General

Profile

Actions

Bug #97710

closed

Missing languagefield in select causes failing overlay

Added by Henrik Elsner over 2 years ago. Updated 4 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Start date:
2022-05-31
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.0
Tags:
Complexity:
no-brainer
Is Regression:
Sprint Focus:

Description

We use the `TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor`

To be efficient we define our `selectFields` properly for only the fields we need.
Due to this a side effect occurred causing the overlay to fail.

In typo3/sysext/core/Classes/Domain/Repository/PageRepository.php:620
the following check is done.

`if ((int)$row[$tableControl['languageField']] === 0) {`

Now the issue is, if selectFields does not have the languageField listed, this check will always fail and throw away the.

Solution:
Not sure, but i would expect to check for the languageField and if there is non given it should be fetched, based on TCA etc.

Our test setup:


1 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor
1 {
    selectFields = uid, header, CType
    table = tt_content
    pidInList.field = pid
    where.field = records
    where.wrap = uid IN (|)
    orderBy = sorting
    as = inpage-nav-anchors
}

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #98404: PHP Warning: Undefined array key "sys_language_uid" in PageRepositoryClosedDaniel Siepmann2022-09-22

Actions
Related to TYPO3 Core - Feature #97639: Multilang bug in cObjGetSingle. No data is returned for records if sys_language_uid is set to -1.Closed2022-05-16

Actions
Actions

Also available in: Atom PDF