#95662DOCS: SimpleRouteEnhancer adds cHash
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: pdfReviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Related issues 1
History 12
-
Henri Nathanson changed Related to #91447 <span data-processor="relativetime" data-value="2021-10-15T10:21:36+00:00" > 10/15/21, 10:21 </span>
-
Henri Nathanson changed description <span data-processor="relativetime" data-value="2021-10-15T10:24:09+00:00" > 10/15/21, 10:24 </span>
-
Henri Nathanson changed description <span data-processor="relativetime" data-value="2021-10-15T10:24:41+00:00" > 10/15/21, 10:24 </span>
-
Oliver Hader commented and changed status
NewNeeds Feedback <span data-processor="relativetime" data-value="2021-10-20T06:51:39+00:00" > 10/20/21, 06:51 </span> -
Henri Nathanson commented <span data-processor="relativetime" data-value="2021-10-20T12:28:14+00:00" > 10/20/21, 12:28 </span>
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?
-
Oliver Hader commented <span data-processor="relativetime" data-value="2021-10-20T13:43:25+00:00" > 10/20/21, 13:43 </span>
Using
ExtbaseEnhancerwould fix the part on the missing mapper definition fortx_myext_lehrgaenge[controller]in your site configuration – basically since the controller-action pair needs to be explicitly given in the route configuration. -
Oliver Hader commented and changed subject
SimpleRouteEnhancer adds cHashDOCS: SimpleRouteEnhancer adds cHash <span data-processor="relativetime" data-value="2022-11-03T12:46:32+00:00" > 11/03/22, 12:46 </span>I agree, that
cHashimpact could be described better in documentation. -
Oliver Hader changed Sprint Focus On Location Sprint <span data-processor="relativetime" data-value="2022-11-03T12:46:38+00:00" > 11/03/22, 12:46 </span>
-
Benni Mack changed status
Needs FeedbackAccepted <span data-processor="relativetime" data-value="2023-08-02T12:33:03+00:00" > 08/02/23, 12:33 </span> -
Benni Mack changed Sprint Focus
On Location Sprint<span data-processor="relativetime" data-value="2023-08-02T13:05:22+00:00" > 08/02/23, 13:05 </span> -
Oliver Hader commented and changed status
AcceptedResolved <span data-processor="relativetime" data-value="2025-04-01T21:06:44+00:00" > 04/01/25, 21:06 </span>Seems to be resolved.
-
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2025-12-02T14:33:53+00:00" > 12/02/25, 14:33 </span>
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/controllerBesides 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_lehrgaengeas plugin namespace):https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/Routing/AdvancedRoutingConfiguration.html#extbase-plugin-enhancer