Issue Bug Closed

#91294Multiple StaticValueMappers interference

Anonymous 05/04/20, 16:08 updated 09/29/26, 20:56

Description

The following configuration generates the following url for example.

tx_awesomeextension_bestplugin[filter][foo] = 1
tx_awesomeextension_bestplugin[filter][bar] = 0

http://great.ddev.site/foo0

routeEnhancers:
    Sample:
        type: Extbase
        extension: AwesomeExtension
        plugin: BestPlugin
        routes:
            -   routePath: '/{foo}{bar}'
                _arguments:
                    foo: 'filter/foo'
                    bar: 'filter/bar'
                _controller: 'Foo::bar'
        defaultController: 'Foo::bar'
        aspects:
            foo:
                type: StaticValueMapper
                map:
                    foo: 1

Go one step further and lets add another StaticValueMapper:

routeEnhancers:
    Sample:
        type: Extbase
        extension: AwesomeExtension
        plugin: BestPlugin
        routes:
            -   routePath: '/{foo}{bar}'
                _arguments:
                    foo: 'filter/foo'
                    bar: 'filter/bar'
                _controller: 'Foo::bar'
        defaultController: 'Foo::bar'
        aspects:
            foo:
                type: StaticValueMapper
                map:
                    foo: 1
            bar:
                type: StaticValueMapper
                map:
                    bar: 1

We would expect to see: http://great.ddev.site/foo?tx_awesomeextension_bestplugin[filter][bar]=0

What actually happens: http://great.ddev.site/10

(skipped cHash for examples)

Reviews 0

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

History 8

  1. Anonymous changed subject Multiple StaticValueMappers interfere Multiple StaticValueMappers interference <span data-processor="relativetime" data-value="2020-05-04T16:09:31+00:00" > 05/04/20, 16:09 </span>

  2. Georg Ringer commented and changed status New Closed <span data-processor="relativetime" data-value="2026-09-29T20:56:25+00:00" > 09/29/26, 20:56 </span>

    The URL does not contain unmapped raw values anymore. If a value cannot be mapped by an aspect, the route does not apply and all arguments are added as query parameters.
    Generating a route with a missing required placeholder is not supported, so the expected /foo?…[bar]=0 is not possible with this configuration.

    Closing, please reopen if it still happens.