Issue Bug Closed

#95662DOCS: SimpleRouteEnhancer adds cHash

Henri Nathanson 10/15/21, 10:21 updated 12/02/25, 14:33

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

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 12

  1. Oliver Hader commented and changed status New Needs Feedback <span data-processor="relativetime" data-value="2021-10-20T06:51:39+00:00" > 10/20/21, 06:51 </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/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

  2. 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.

  3. Oliver Hader commented <span data-processor="relativetime" data-value="2021-10-20T13:43:25+00:00" > 10/20/21, 13:43 </span>

    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.

  4. Oliver Hader commented and changed subject SimpleRouteEnhancer adds cHash DOCS: 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 cHash impact could be described better in documentation.

  5. Oliver Hader commented and changed status Accepted Resolved <span data-processor="relativetime" data-value="2025-04-01T21:06:44+00:00" > 04/01/25, 21:06 </span>

    Seems to be resolved.