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 #1

Updated by JAKOTA Design Group GmbH over 2 years ago

  • Target version set to Candidate for patchlevel
  • TYPO3 Version changed from 10 to 11
  • PHP Version set to 8.0
  • Complexity set to no-brainer

Hi, I have the same issue in Typo3 v11

typo3/sysext/core/Classes/Domain/Repository/PageRepository.php

Line 619 is

&& (int)$row[$tableControl['languageField']] !== -1

but should be

&& isset($row[$tableControl['languageField']]) && (int)$row[$tableControl['languageField']] !== -1
Actions #2

Updated by Susanne Moog over 2 years ago

  • Sprint Focus set to On Location Sprint
Actions #3

Updated by Gerrit Code Review over 2 years ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75379

Actions #4

Updated by Gerrit Code Review about 2 years ago

Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74796

Actions #5

Updated by Oliver Hader about 2 years ago

  • Sprint Focus deleted (On Location Sprint)
Actions #6

Updated by Christian Kuhn almost 2 years ago

  • Related to Bug #98404: PHP Warning: Undefined array key "sys_language_uid" in PageRepository added
Actions #7

Updated by Christian Kuhn almost 2 years ago

  • Status changed from Under Review to Resolved

I think this has been fixed with #98404.

Actions #8

Updated by Benni Mack almost 2 years ago

  • Status changed from Resolved to Closed
Actions #9

Updated by Gerrit Code Review over 1 year ago

  • Status changed from Closed to Under Review

Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74796

Actions #10

Updated by JAKOTA Design Group GmbH over 1 year ago

  • Related to Feature #97639: Multilang bug in cObjGetSingle. No data is returned for records if sys_language_uid is set to -1. added
Actions #11

Updated by Gerrit Code Review over 1 year ago

Patch set 6 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74796

Actions #12

Updated by Gerrit Code Review over 1 year ago

Patch set 7 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74796

Actions #13

Updated by Gerrit Code Review over 1 year ago

Patch set 8 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74796

Actions #14

Updated by Gerrit Code Review over 1 year ago

Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79778

Actions #15

Updated by Gerrit Code Review over 1 year ago

Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79779

Actions #16

Updated by Henrik Elsner over 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #17

Updated by Benni Mack 4 months ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF