Project

General

Profile

Actions

Bug #95797

open

Fail gracefully when using mm table with TCA group without

Added by Lina Wolf over 2 years 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

No data to display

Actions

Also available in: Atom PDF