Issue Bug Closed

#91880Routing for actions without parameters broken

Robert Vock 07/28/20, 15:55 updated 09/29/20, 15:07

Description

I have the following Routing Configuration:

  RegistrationPlugin:
    type: Extbase
    extension: SfRegister
    plugin: Form
    defaultController: 'FeuserCreate::form'
    routes:
      -
        routePath: '/'
        _controller: 'FeuserCreate::form'
      -
        routePath: '/speichern'
        _controller: 'FeuserCreate::save'
      -
        routePath: '/bestaetigen/{user}/{hash}'
        _controller: 'FeuserCreate::confirm'
        _arguments:
          user: user
          hash: hash

Until TYPO3 9.5.19 this generated pretty URLs for the save action:
/registrierung/speichern

With TYPO3 9.5.20 Update the controller and action parameters are not encoded anymore:
/registrierung?tx_sfregister_form%5Baction%5D=save&tx_sfregister_form%5Bcontroller%5D=FeuserCreate&cHash=d0b4e36e4798e4ce992891ce20b160f9

It appears this bug has been introduced with #90924:
ExtbasePluginEnhancer.php:149

If I change the condition, the URL works fine:

if ($diff = array_diff_key($variables, $mergedParams)) {

Reviews 3