Project

General

Profile

Actions

Bug #90399

closed

Unable to use EventDispatcherInterface in custom TreeDataProvider

Added by Christoph Lehmann about 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2020-02-16
Due date:
% Done:

0%

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

Description

https://docs.typo3.org/m/typo3/reference-tca/master/en-us/ColumnsConfig/Type/Select.html#treeconfig allows to set a custom DataProvider.

In TYPO3.CMS/typo3/sysext/core/Classes/Tree/TableConfiguration/TreeDataProviderFactory.php:43 the custom DataProvider is created but there is no check if it implements the EventDispatcherInterface.

        if (!empty($tcaConfiguration['treeConfig']['dataProvider'])) {
            $dataProvider = GeneralUtility::makeInstance($tcaConfiguration['treeConfig']['dataProvider'], $tcaConfiguration, $table, $field, $currentValue);
        }

This ends in an exception:

"Argument 1 passed to TYPO3\\CMS\\Core\\Tree\\TableConfiguration\\MyTreeDataProvider::__construct() must implement interface Psr\\EventDispatcher\\EventDispatcherInterface, array given.

The custom DataProvider looks like this

<?php
namespace TYPO3\CMS\Core\Tree\TableConfiguration;
class MyTreeDataProvider extends DatabaseTreeDataProvider {}

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #90302: DatabaseTreeDataProvider crashes after switching to PSR-14Closed2020-02-03

Actions
Actions #1

Updated by Christoph Lehmann about 4 years ago

  • Description updated (diff)
Actions #2

Updated by Christoph Lehmann about 4 years ago

  • Related to Bug #90302: DatabaseTreeDataProvider crashes after switching to PSR-14 added
Actions #3

Updated by Christoph Lehmann about 4 years ago

Is duplicate of #90302, please close it

Actions #4

Updated by Georg Ringer about 4 years ago

  • Status changed from New to Closed

closed as duplicate

Actions

Also available in: Atom PDF