Issue Bug Closed

#95797Fail gracefully when using mm table with TCA group without

Lina Wolf 10/27/21, 09:31 updated 12/02/25, 14:33

Description

When I am using the following TCA config:

  'myextension_topic_manager' => array(
        'exclude' => 0,
        'label' => 'Projektleitung',
        'config' => [
            'type' => 'group',
            'allowed' => 'tt_address',
            'MM' => 'tx_ttaddress_news_myextensionmanager',
        ],
    ),

While accidently forgetting the

'foreign_table' => 'tt_address',

In an Extbase model with


    /**
     * newsManager
     *
     * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\FriendsOfTYPO3\TtAddress\Domain\Model\Address>
     * @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
     */
    protected $myextensionTopicManager = null;

I get the following, quite ungracefull error, deep in the system:

Argument 2 passed to TYPO3\CMS\Core\Database\Query\QueryBuilder::leftJoin() must be of the type string, null given, called in /var/www/html/web/typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbQueryParser.php on line 917

I would love to see a more meaningfull error, that is easier to document and debug as long as it is not possible to remove the allowed / foreign_table duplication.

Tested in v 11.5.1

Reviews 2

History 410

  1. Philipp Gollmer commented <span data-processor="relativetime" data-value="2024-08-07T07:31:24+00:00" > 08/07/24, 07:31 </span>

    Found the exact same issue and solution in TYPO3 13.2.1 with PHP 8.3

  2. Benni Mack commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2025-04-07T19:55:08+00:00" > 04/07/25, 19:55 </span>

    Applied in changeset commit:3f1a68654cbea25438a543b66a1722563fe6a2df.

  3. Gerrit Code Review pushed patch set 1 for 13.4 to change 88967 status Resolved Under Review <span data-processor="relativetime" data-value="2025-04-07T19:56:03+00:00" > 04/07/25, 19:56 </span>

  4. Benni Mack commented and changed status Under Review Resolved <span data-processor="relativetime" data-value="2025-04-08T08:30:11+00:00" > 04/08/25, 08:30 </span>

    Applied in changeset commit:965c9c4a33f9b0257fae96a9bae0b1a6c5aef51d.