Issue Bug Closed

#97710Missing languagefield in select causes failing overlay

Henrik Elsner 05/31/22, 07:29 updated 07/09/24, 12:46

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
}

Reviews 4