Bug #87542
closedExtbasePluginEnhancer does not work with skipDefaultArguments
0%
Description
When I set config.tx_extbase.features.skipDefaultArguments = 1 in TypoScript, then the controller-parameter will not appear in the $parameters, when it's the default controller for the plugin. When applyControllerActionValues gets called, it overwrites the current action of the parameters-array with the default action.
Relevant code positions:
ExtbasePluginEnhancer.php#L117
ExtbasePluginEnhancer.php#L216
Updated by Dennis Grün over 5 years ago
Confirmed, same issue here.
Maybe as a workaround you could define that default parameters in the yaml site config and nullify them, while disabling the skipDefaultArguments option.
I'll be testing that later on.
Tested:
You can remove the default Controller/Action with this additional route. In my case it's the list Action of the Project controller.
- { routePath: '', _controller: 'Project::list' }
Regarding "skipDefaultArguments" it's definitely a bug.
Updated by Alex Nostadt about 5 years ago
Robert Vock wrote:
When I set config.tx_extbase.features.skipDefaultArguments = 1 in TypoScript, then the controller-parameter will not appear in the $parameters, when it's the default controller for the plugin. When applyControllerActionValues gets called, it overwrites the current action of the parameters-array with the default action.
Relevant code positions:
ExtbasePluginEnhancer.php#L117
ExtbasePluginEnhancer.php#L216
Out of curiosity, could this be related to https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/Routing/AdvancedRoutingConfiguration.html?highlight=slug#extbase-plugin-enhancer ? To be specific, the explicit shown warning.
Updated by Robert Vock about 5 years ago
You're right. When I wrote this bug report, that documentation didn't exist. I only had the Feature description: https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/9.5/Feature-86365-RoutingEnhancersAndAspects.html
I guess you can close this report or update the enhancer to respect the defaultController.
Updated by Benni Mack over 4 years ago
- Status changed from New to Closed
Thanks for investigating and also on the feedback, Alex. I've improved the docs since then! Closing the issue.