Project

General

Profile

Actions

Bug #94154

closed

TypeError for missing transOrigPointerField field

Added by Daniel Siepmann almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
Start date:
2021-05-18
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

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
        ) {

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #94057: PHP 8.0 Acceptance TestsClosed2021-05-04

Actions
Actions #1

Updated by Gerrit Code Review almost 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

Actions #2

Updated by Gerrit Code Review almost 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

Actions #3

Updated by Oliver Bartsch almost 3 years ago

  • Related to Task #94057: PHP 8.0 Acceptance Tests added
Actions #4

Updated by Oliver Bartsch almost 3 years ago

  • Is Regression set to Yes
Actions #5

Updated by Gerrit Code Review almost 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

Actions #6

Updated by Gerrit Code Review almost 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

Actions #7

Updated by Daniel Siepmann almost 3 years ago

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

Updated by Benni Mack almost 3 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF