Bug #93840
closedRouteEnhancers with no arguments don't work
0%
Description
I've had a similar problems as described in this post https://stackoverflow.com/questions/59563985/typo3-9-routing-enhancers-with-no-arguments, when trying to define a routing config for the most basic use cases.
For example, in a shopping cart application, all data is stored in the user session, so no arguments are required to call any of the actions. I tried something like this:
routeEnhancers:
CartPlugin:
type: Extbase
extension: MyCart
plugin: Cart
routes:
- { routePath: '/mycart/', _controller: 'Cart::cart' }
- { routePath: '/summary/', _controller: 'Cart::summary' }
- { routePath: '/confirmation/', _controller: 'Cart::confirm' }
defaultController: 'Cart::cart'
The links were created correctly, but when clicking them you would get a 404. Why doesn't this work?
There is no ambiguity in the route paths. There are no parameters that could be wrong or missing or not meeting the requirements.
The documentation has a similar example for rewriting the list action of News, with just a route path + controller without any parameters, which suggests this should be possible.
I've had complicated cases with lots of parameters, own aspects, all sorts of sophisticated mappings, which work very well. So why doesn't such a basic configuration work correctly? Am I missing something? This should be simple (maybe not to code, but to configure).