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 05/04/20, 16:09

  2. Anonymous changed description 05/04/20, 19:22

  3. Anonymous changed description 05/04/20, 19:22

  4. Anonymous changed description 05/04/20, 19:28

  5. Anonymous changed description 05/04/20, 19:37

  6. Simon Schaufelberger changed category 04/27/22, 00:41

  7. Georg Ringer changed Related to #91298 09/10/26, 21:07

  8. Georg Ringer commented and changed status New Closed 09/29/26, 20:56

    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.