Bug #93727
closedExtbase Routing Enhancer with several routes doesn't work when routes use different controller
0%
Description
When you have several routes configured (like the default EXT:news config ) and all routes have the same controller set - everything is fine.
But if Georg would add something like
- routePath: '/' _controller: 'News::list' # ... - routePath: '/archive' _controller: 'NewsArchive::list'
The "/archive" url will never appear, because of different controller set (compared with defaultController: 'News::list'
configuration).
I was able to follow the bug, till \TYPO3\CMS\Extbase\Routing\ExtbasePluginEnhancer::verifyRequiredParameters
.
As workaround, I've created a showArchiveAction
in NewsController
, which just redirects to NewsArchiveController::list
and pointed my f:link.action
ViewHelpers to this new action.
Updated by Riccardo De Contardi over 3 years ago
- Category set to Site Handling, Site Sets & Routing
Updated by Katja Lutz over 3 years ago
Just wanted to chime in with Armin. I got a similar issue with the "plugin" config of route enhancers: currently those route enhancers apply even for pages missing the specified plugin.
In my TYPO3 10.4 project we created a workaround-ish middleware, which disables plugin route enhancers if the requested page doesn't have a corresponding plugin.
As a solution I propose, that we should change the routing like this:- _controller should be respected per routePath
- plugin route enhancers should only apply to pages having content with the specified plugin
What do you think about this?
Updated by Oliver Hader about 2 years ago
- Sprint Focus set to On Location Sprint
Updated by Oliver Hader about 2 years ago
- Is duplicate of Bug #95766: Routing across extensions added
Updated by Oliver Hader about 2 years ago
- Status changed from New to Closed
→ please continue at #95766 which is very similar to this one