#91333routeEnhancer of type Extbase with multiple routePaths and various argument with same controller and action are broken since Typo3 9.5.14
Description
The given routeEnhancer configuration does not work in our multisite anymore:
routeEnhancers:
PageTypeSuffix:
type: PageType
default: /
index: ''
NewsPlugin:
type: Extbase
extension: News
plugin: Pi1
routes:
# Pagination:
- routePath: '/seite-{page}'
_controller: 'News::list'
_arguments:
page: '@widget_0/currentPage'
# detail
- routePath: '/news/{news_title}'
_controller: 'News::detail'
_arguments:
news_title: news
# Date year:
- routePath: '/{date_year}'
_controller: 'News::list'
_arguments:
date_month: 'overwriteDemand/month'
date_year: 'overwriteDemand/year'
# Date year + pagination:
- routePath: '/{date_year}/seite-{page}'
_controller: 'News::list'
_arguments:
date_year: 'overwriteDemand/year'
page: '@widget_0/currentPage'
# Date year/month:
- routePath: '/{date_year}/{date_month}'
_controller: 'News::list'
_arguments:
date_month: 'overwriteDemand/month'
date_year: 'overwriteDemand/year'
# Date year/month + pagination:
- routePath: '/{date_year}/{date_month}/seite-{page}'
_controller: 'News::list'
_arguments:
date_month: 'overwriteDemand/month'
date_year: 'overwriteDemand/year'
page: '@widget_0/currentPage'
requirements:
page: '\d+'
date_month: '\d+'
date_year: '\d+'
defaultController: 'News::list'
defaults:
page: '1'
date_month: ''
date_year: ''
aspects:
news_title:
type: PersistedAliasMapper
tableName: tx_news_domain_model_news
routeFieldName: path_segment
page:
type: StaticRangeMapper
start: '1'
end: '100'
date_month:
type: StaticValueMapper
map:
januar: '01'
februar: '02'
maerz: '03'
april: '04'
mai: '05'
juni: '06'
juli: '07'
august: '08'
september: '09'
oktober: '10'
november: '11'
dezember: '12'
date_year:
type: StaticRangeMapper
start: '2016'
end: '2020'
With the given example the url path is like https://www.domain.tld/news///seite-2/ in a pagination navigation.
So the routeEnhancer uses the last pathRoute always:
# Date year/month + pagination:
- routePath: '/{date_year}/{date_month}/seite-{page}'
_controller: 'News::list'
_arguments:
date_month: 'overwriteDemand/month'
date_year: 'overwriteDemand/year'
page: '@widget_0/currentPage'
If I change the position of the “# Pagination:” part to the bottom, it’ll work, but the rest does not in general.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.