Commit af5ce3d6 authored by Christian Eßl's avatar Christian Eßl Committed by Alexander Schnitzler
Browse files

[BUGFIX] Make $actionName argument in ExtensionService nullable

The method ExtensionService::getPluginNameByAction() was hardened in
This breaks previous functionality, where it was possible to call
ActionController::redirect() without an action given, which produces
perfectly valid urls.

Resolves: #90422
Releases: master
Change-Id: Ib43a7655c03301d0d358b56003ad45a757a9a0dd

Tested-by: default avatarTYPO3com <>
Tested-by: default avatarAlexander Schnitzler <>
Reviewed-by: default avatarChristian Eßl <>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <>
Reviewed-by: default avatarAlexander Schnitzler <>
parent 1cd43dd2
......@@ -576,7 +576,7 @@ class UriBuilder
$extensionName = $this->request->getControllerExtensionName();
if ($pluginName === null && $this->environmentService->isEnvironmentInFrontendMode()) {
$pluginName = $this->extensionService->getPluginNameByAction($extensionName, $controllerArguments['controller'], $controllerArguments['action']);
$pluginName = $this->extensionService->getPluginNameByAction($extensionName, $controllerArguments['controller'], $controllerArguments['action'] ?? null);
if ($pluginName === null) {
$pluginName = $this->request->getPluginName();
......@@ -104,11 +104,11 @@ class ExtensionService implements \TYPO3\CMS\Core\SingletonInterface
* @param string $extensionName name of the target extension (UpperCamelCase)
* @param string $controllerName name of the target controller (UpperCamelCase)
* @param string $actionName name of the target action (lowerCamelCase)
* @param string|null $actionName name of the target action (lowerCamelCase)
* @throws \TYPO3\CMS\Extbase\Exception
* @return string|null name of the target plugin (UpperCamelCase) or NULL if no matching plugin configuration was found
public function getPluginNameByAction(string $extensionName, string $controllerName, string $actionName): ?string
public function getPluginNameByAction(string $extensionName, string $controllerName, ?string $actionName): ?string
$frameworkConfiguration = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
// check, whether the current plugin is configured to handle the action
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment