Project

General

Profile

Actions

Bug #91249

closed

Two plugins calling the same action method

Added by Hagen Gebauer about 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Should have
Category:
Extbase
Start date:
2020-04-30
Due date:
% Done:

100%

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

Description

In my extension I have two plugins, both calling the show action method (ext_localconf.php):

\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
    'Vendor.researchgroups',
    'FieldList',
    [
        'Fields' => 'list, show'
    ]
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
    'Vendor.researchgroups',
    'FieldShow',
    [
        'Fields' => 'show'
    ]
);

This worked well in T3v9 – but in T3v10 I get the following error message in a content element where I call FieldList
(CType: list, list_type: researchgroups_fieldlist):

(1/1) #1280825466 TYPO3\CMS\Extbase\Exception

There is more than one plugin that can handle this request (Extension: "Researchgroups", Controller: "Fields", action: "show"). Please specify "pluginName" argument

The pluginName seems to be missing in TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder->uriFor():

TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder->uriFor('show', array('fields' => 1, 'action' => 'show', 'controller' => 'Fields'), null, 'Researchgroups', null)

Additionally there’s the Configuration/TCA/Overrides/tt_content.php:

\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
    'researchgroups',
    'FieldList',
    'Research Groups: List of Research Fields'
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
    'researchgroups',
    'FieldShow',
    'Research Groups: Selected Research Field'
);

When I remove the FieldShow plugin completely or rename the show action in its configuration, the error is gone.

I wouldn’t know in what way I could specify the pluginName other than through plugin registration and configuration and of course the selection in the content element.

Actions

Also available in: Atom PDF