Route Enhancer Felogin TYPO3 11.x

230 views Asked by At

I have some problems with the TYPO3 felogin extension. Login and logout works fine except the password recovery function.

The latter is at least working so far, that an email with a recovery link is sent.

Unfortunately, i just get this URL:

http://https///features/default-title?tx_felogin_login%5Baction%5D=showChangePassword&tx_felogin_login%5Bcontroller%5D=PasswordRecovery&tx_felogin_login%5Bhash%5D=1675150020%7C7cab56226b73b58564ed893d2590a118d91db7a6&cHash=306206acc86088601981fea5a047ef59

I know that this has something to do with the Route Enhancers, so I add some lines to my config.yaml:

  ForgotPassword:
    type: Plugin
    limitToPages: [13]
    routePath: '/forgot-password/{user}/{hash}'
    namespace: 'tx_felogin_pi1'
    defaults:
      forgot: '1'
    requirements:
      user: '[0-9]{1,3}'
      hash: '^[a-zA-Z0-9]{32}$' 

But there is still this weird URL. Does anyone has an idea what's going wrong here?

Many thanks for hints in advance!

Best, expikx

1

There are 1 answers

0
Erika On

I had the same problem and it was because in the sites/my_site/config.yaml I had:

baseVariants:
  - base: /

I have replaced this with:

baseVariants:
  - base: 'https://example.ddev.site/'

For pretty urls regarding felogin I used the following route enhancers:

routeEnhancers:
  Felogin:
    type: Extbase
    extension: Felogin
    plugin: Login
    routes:
      -
        routePath: /forgot-password
        _controller: 'PasswordRecovery::recovery'
      -
        routePath: ''
        _controller: 'Login::login'

I hope this helps :)