Project

General

Profile

Actions

Bug #95797

open

Fail gracefully when using mm table with TCA group without

Added by Lina Wolf about 3 years ago. Updated 4 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2021-10-27
Due date:
% Done:

0%

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

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

Actions #1

Updated by Philipp Gollmer 4 months ago

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

Actions

Also available in: Atom PDF