Two plugins calling the same action method
In my extension I have two plugins, both calling the show action method
\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('show', array('fields' => 1, 'action' => 'show', 'controller' => 'Fields'), null, 'Researchgroups', null)
Additionally there’s the
\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.
[BUGFIX] Fix detection of plugin name by action
While switching from controller class aliases to fully
qualified controller class names (internally), the structure
of framework configuration slightly changed.
This unfortunately broke the detection of the plugin name
by action because the new structure had not been checked for.
Also, there was a unit test which hasn't been adjusted to the
new structure as well because it was simply overlooked.
With this patch the bug is fixed and the fix is also covered
again by a unit test.
Tested-by: TYPO3com <email@example.com>
Tested-by: Susanne Moog <firstname.lastname@example.org>
Tested-by: Daniel Goerz <email@example.com>
Reviewed-by: Helmut Hummel <firstname.lastname@example.org>
Reviewed-by: Susanne Moog <email@example.com>
Reviewed-by: Daniel Goerz <firstname.lastname@example.org>
#3 Updated by Gerrit Code Review 23 days ago
- Status changed from In Progress to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64388