[BUGFIX] Set controller in ExtbasePluginEnhancer 43/59343/2
authorGuido Schmechel <guido.schmechel@brandung.de>
Sat, 5 Jan 2019 18:34:35 +0000 (19:34 +0100)
committerBenni Mack <benni@typo3.org>
Thu, 7 Feb 2019 06:39:14 +0000 (07:39 +0100)
If the controller of a route in a routeEnhancer differs
from the default controller, it will now be used for the
generation of enhancers.

Resolves: #87337
Releases: master, 9.5
Change-Id: Iea3d15bbc99cb17c640e6a4824d3dd42176295d1
Reviewed-on: https://review.typo3.org/59343
Tested-by: TYPO3com <noreply@typo3.com>
Reviewed-by: Alexander Grein <alexander.grein@gmail.com>
Tested-by: Alexander Grein <alexander.grein@gmail.com>
Reviewed-by: Richard Haeser <richard@maxserv.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/extbase/Classes/Routing/ExtbasePluginEnhancer.php

index c24ed9e..62ebfde 100644 (file)
@@ -124,6 +124,13 @@ class ExtbasePluginEnhancer extends PluginEnhancer
         /** @var Route $defaultPageRoute */
         $defaultPageRoute = $collection->get('default');
         foreach ($this->routesOfPlugin as $configuration) {
+            if (!empty($configuration['_controller'])) {
+                $this->applyControllerActionValues(
+                    $configuration['_controller'],
+                    $originalParameters[$this->namespace]
+                );
+            }
+
             $variant = $this->getVariant($defaultPageRoute, $configuration);
             // The enhancer tells us: This given route does not match the parameters
             if (!$this->verifyRequiredParameters($variant, $originalParameters)) {