Bug #97710
closedMissing languagefield in select causes failing overlay
100%
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
}
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
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
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
Updated by Oliver Hader about 2 years ago
- Sprint Focus deleted (
On Location Sprint)
Updated by Christian Kuhn almost 2 years ago
- Related to Bug #98404: PHP Warning: Undefined array key "sys_language_uid" in PageRepository added
Updated by Christian Kuhn almost 2 years ago
- Status changed from Under Review to Resolved
I think this has been fixed with #98404.
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
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
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
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
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
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
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
Updated by Henrik Elsner over 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 7e392c6df7ec32e605a5d7faa58bc633673d68e2.