Project

General

Profile

Actions

Bug #93727

closed

Extbase Routing Enhancer with several routes doesn't work when routes use different controller

Added by Armin Vieweg about 3 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2021-03-12
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
On Location Sprint

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.


Related issues 1 (1 open0 closed)

Is duplicate of TYPO3 Core - Bug #95766: Routing across extensionsUnder ReviewOliver Hader2021-10-25

Actions
Actions #1

Updated by Riccardo De Contardi almost 3 years ago

  • Category set to Link Handling, Site Handling & Routing
Actions #2

Updated by Katja Lutz almost 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?

Actions #3

Updated by Oliver Hader over 1 year ago

  • Sprint Focus set to On Location Sprint
Actions #4

Updated by Oliver Hader over 1 year ago

  • Is duplicate of Bug #95766: Routing across extensions added
Actions #5

Updated by Oliver Hader over 1 year ago

  • Status changed from New to Closed

→ please continue at #95766 which is very similar to this one

Actions

Also available in: Atom PDF