Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add _arguments to Plugin route enhancer configuration #5390

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

brotkrueml
Copy link
Contributor

You have to map the user_id to a field, this part was missing.

See: https://github.com/TYPO3/typo3/blob/main/typo3/sysext/core/Classes/Routing/Enhancer/PluginEnhancer.php#L31-L41
Releases: main, 13.4, 12.4

@brotkrueml
Copy link
Contributor Author

Actually, I haven't used the Felogin plugin yet. So, I don't know, if the defaults.forgot part is necessary, or what about the length of the hash.

But: configuring a routing for a (non-Extbase) plugin, the _arguments part cost my time to find out.

@linawolf
Copy link
Member

actually the user id should be a number, not letters so I woulldnt want to change this part..

@linawolf linawolf added backport 12.4 Backport to TYPO3v12 backport 13.4 Backport to TYPO3v13 labels Feb 25, 2025
@brotkrueml
Copy link
Contributor Author

brotkrueml commented Feb 25, 2025

actually the user id should be a number, not letters so I woulldnt want to change this part..

Nope, this is the name which is checked (from the aspect). Had this today in a custom extension (with an uid), the numbers won't match, the [a-z] matches the title from the aspect.

@froemken
Copy link
Contributor

If we update that part which is based on old plugin mechanism I prefer updating that part to an extbase example, as felogin is extbase. Just played around a bit. What about?

routeEnhancers:
  ForgotPassword:
    type: Extbase
    extension: Felogin
    plugin: Login
    routes:
      - routePath: '/forgot-pw'
        _controller: 'PasswordRecovery::recovery'
      - routePath: '/forgot-pw/{hash}/form'
        _controller: 'PasswordRecovery::showChangePassword'
    requirements:
      hash: '[0-9]{10,11}|[a-zA-Z0-9]{40}'

@linawolf
Copy link
Member

We cannot switch to using type: Extbase when we want to demonstrate type:Plugin? so we would need a complete new example then?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 12.4 Backport to TYPO3v12 backport 13.4 Backport to TYPO3v13
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants