Actions
Bug #91447
closedSimpleEnhancer don't inflate nested arguments
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Site Handling, Site Sets & Routing
Target version:
-
Start date:
2020-05-20
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
Hi,
we try to use the SimpleEnhancer to replace speaking urls into GET parameters.
Our example config is:
ExampleSimpleEnhancer: type: Simple routePath: '/fuid/{fuid}/fcat/{fcat}' _arguments: fuid: tx_example_pi1/uid fcat: tx_example_pi2/cat
We found out, that the defined arguments don't be inflated in to the nested structure of the target GET parameters.
Expected data structure:
$_GET = array ( 'tx_example_pi1' => array ( 'uid' => 123, ), 'tx_example_pi2' => array ( 'uid' => 234, ), );
By the way the PluginEnhancer does that, but all under one defined namespace and not in different data structures.
Debuggings in the SimpleEnhancer with the PluginEnhancer in mind, lead us to behavior, when we use in SimpleEnhancer::buildResult the method VariableProcessor::inflateNamespaceParameters with a fake namespace for inflating the $routeArguments, then the result will be expected.
This fix our problem in SimpleEnhancer::buildResult:
// $routeArguments = $this->getVariableProcessor()->inflateParameters($parameters, $route->getArguments()); $routeArguments = $this->getVariableProcessor()->inflateNamespaceParameters($parameters, 'foo', $route->getArguments());
Thanks for investigation and fixing.
Actions