Bug #94154
closedTypeError for missing transOrigPointerField field
100%
Description
A TypeError is thrown when accessing the list module with records that have a TCA entry with configured ctrl.languageField but without ctrl.transOrigPointerField.
(1/1) TypeError Argument 1 passed to TYPO3\CMS\Core\Database\Query\Expression\ExpressionBuilder::eq() must be of the type string, null given, called in /typo3/sysext/backend/Classes/Utility/BackendUtility.php on line 3207 in /typo3/sysext/core/Classes/Database/Query/Expression/ExpressionBuilder.php line 110 * @param mixed $value The value. No automatic quoting/escaping is done. * * @return string */ public function eq(string $fieldName, $value): string { return $this->comparison($this->connection->quoteIdentifier($fieldName), static::EQ, $value); } at TYPO3\CMS\Core\Database\Query\Expression\ExpressionBuilder->eq() in /typo3/sysext/backend/Classes/Utility/BackendUtility.php line 3207 ->from($table) ->where( $queryBuilder->expr()->eq( $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'], $queryBuilder->createNamedParameter($ref, \PDO::PARAM_INT) ), $queryBuilder->expr()->neq( $GLOBALS['TCA'][$table]['ctrl']['languageField'], $queryBuilder->createNamedParameter(0, \PDO::PARAM_INT)
Looks like the if condition doesn't work as expected:
if ($GLOBALS['TCA'][$table]['ctrl']['languageField'] ?? null && $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'] ?? null ) {
Updated by Gerrit Code Review over 3 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/69180
Updated by Gerrit Code Review over 3 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/69180
Updated by Oliver Bartsch over 3 years ago
- Related to Task #94057: PHP 8.0 Acceptance Tests added
Updated by Gerrit Code Review over 3 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/69180
Updated by Gerrit Code Review over 3 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/69180
Updated by Daniel Siepmann over 3 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 1181b126dbe9db8d47dc7a7d2ad990e1f5d36e22.