Bug #95662
openDOCS: SimpleRouteEnhancer adds cHash
0%
Description
The plugin action "pdf" was routed with /pdf as of v10.4.20. The behaviour changed with v10.4.21 and #91447 to /pdf?cHash=xxx
The action is configured as non-cacheable in ext_localconf.php
Route is generated with: {f:uri.action(action:'pdf')}
LehrgaengePlugin:
type: Simple
routePath: '/{action}/{controller}'
defaults:
controller: Lehrgang
_arguments:
action: tx_myext_lehrgaenge__action
controller: tx_myext_lehrgaenge__controller
aspects:
action:
type: StaticValueMapper
map:
pdf: pdf
Updated by Henri Nathanson about 3 years ago
- Related to Bug #91447: SimpleEnhancer don't inflate nested arguments added
Updated by Oliver Hader about 3 years ago
- Status changed from New to Needs Feedback
Unfortunately that kind of argument mapping was wrong and has been documented differently. Please change to
_arguments: action: tx_myext_lehrgaenge/action controller: tx_myext_lehrgaenge/controller
Besides that, it looks like your application is based on Extbase. Thus, the corresponding plugin enhancer might be used instead as well (which would handle tx_myext_lehrgaenge
as plugin namespace):
https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/Routing/AdvancedRoutingConfiguration.html#extbase-plugin-enhancer
Updated by Henri Nathanson about 3 years ago
I did some debugging here. There was a bug in array handling (inflateParameters() vs inflateNamespaceParameters()), which you fixed lately and which before that resulted in $routeArguments not being reduced by $dynamicArguments. All arguments were handled as static arguments. As in my example configuration above, not all parameters(Lehrgang) have an aspect. They are therefor treated as dynamic. Dynamic parameters - after the fix - lead to the cHash calculation.
I changed my configuration to have an aspect for every parameter. With this all parameters are static.
- I am wondering, if the documentation for SimpleEnhancer is correct? It does not have an aspect in the example given. It should generate a cHash. https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/Routing/AdvancedRoutingConfiguration.html#simple-enhancer
- tx_myext_lehrgaenge/action or tx_myext_lehrgaenge__action has no effect in this situation
- using the ExtbaseEnhancer may be more appropriate, but I should always be able to use the SimpleEnhancer, right?
Updated by Oliver Hader about 3 years ago
Using ExtbaseEnhancer
would fix the part on the missing mapper definition for tx_myext_lehrgaenge[controller]
in your site configuration - basically since the controller-action pair needs to be explicitly given in the route configuration.
Updated by Oliver Hader about 2 years ago
- Subject changed from SimpleRouteEnhancer adds cHash to DOCS: SimpleRouteEnhancer adds cHash
I agree, that cHash
impact could be described better in documentation.
Updated by Oliver Hader about 2 years ago
- Sprint Focus set to On Location Sprint
Updated by Benni Mack over 1 year ago
- Status changed from Needs Feedback to Accepted
Updated by Benni Mack over 1 year ago
- Sprint Focus deleted (
On Location Sprint)