FrontendNodeRoutePartHandler should support partial matches
Jira issue originally created by user @bwaidelich:
imagine following route setup:
-
uriPattern: '{node}/{--plugin.product}'
defaults:
'@package': 'TYPO3.Neos'
'@controller': 'Frontend\Node'
'@action': 'show'
'@format': 'html'
routeParts:
'node':
handler: 'TYPO3\Neos\Routing\FrontendNodeRoutePartHandlerInterface'
``` (simplified)
Now when requesting **products/some-product* the route won't match even if the node *products* exists, because the `FrontendNodeRoutePartHandler` always compares the *whole** request path (until the next static part in the uriPattern).
To resolve this, the handler should only match the path **as far as possible** and then leave the exceeding path (in this case "some-product") for the next `RoutePart` to match.
Currently you have to add a static part to the uriPattern to get it work:
uriPatthen: '{node}/products/{--plugin.product}'
Jira-URL: https://jira.neos.io/browse/NEOS-1085
Any update on this? It would be great if the static part could be avoided.
There's no-one assigned to the ticket so it's probably not a high prio currently for anyone of the team. If you need this feel free to give it a shot. Let us know if you need help with that
Thanks for your reply. I am willing to fix this, but I have no clue where to start. I looked briefly at the code and added some debug messages, but for an newbie it is very hard to find a starting point. I guess it is also hard for you to give me a hint, if it is related to the FrontendNodeRoutePartHandlerInterface or same deeper core concepts/functions. But any advice will be appreciated.
This is a non trivial matter. I spent quite some time on it and it's not that easy.