#90924Maximum route parameters always appended
Description
Since TYPO3 9.5.14 behaviour changed with the following routenhancer example:
Example:
type: Extbase
limitToPages:
- 123
extension: Example
plugin: Example
routes:
-
routePath: '/page/{page}'
_controller: 'Example::list'
_arguments:
page: '@widget_0/currentPage'
-
routePath: '/company/{company_profile}'
_controller: 'Example::list'
_arguments:
company_profile: 'companyProfile'
-
routePath: '/company/{company_profile}/page/{page}'
_controller: 'Example::list'
_arguments:
company_profile: 'companyProfile'
page: '@widget_0/currentPage'
defaultController: 'Example::list'
defaults:
page: '0'
requirements:
page: \d+
aspects:
page:
type: StaticRangeMapper
start: '1'
end: '200'
company_profile:
type: PersistedAliasMapper
tableName: tx_example_domain_model_example
routeFieldName: slug
Until TYPO3 9.5.13 when linking as follows this resulted in a correct and working link like this: /somepage/company/the-company/
<f:link.page pageUid="123" additionalParams="{tx_example_example: {companyProfile: 123}}">Example Company</f:link.page>
In TYPO3 9.5.14 and 9.5.15 it results in a wrong link: /somepage/company/the-company/page/0/ and calling it results in 404.
It looks to me that the routing for some reason picks / matches incorrectly the route ‘/company/{company_profile}/page/{page}’, even though it should pick up the route ‘/company/{company_profile}’ instead, as only the companyProfile parameter is in the link.
So this breaks many of my 9 installations in terms of URLs and I can’t update.
Reviews 3
Related issues 5
- Bug #90959Wrong URL applied for Route
- Bug #91098Routing and RouteEnhancer problems
- Bug #91323Route enhancer kills unregistered get parameters
- Bug #91333routeEnhancer of type Extbase with multiple routePaths and various argument with same controller and action are broken since Typo3 9.5.14
- Bug #91880Routing for actions without parameters broken