#86895routeEnhancer not working correct for paginate widget
Description
routeEnhancers:
CommunityPlugin:
type: Extbase
limitToPages: [15]
extension: Blacommunity
plugin: Blaforum
routes:
- routePath: ''
_controller: 'Subforum::list'
- routePath: '/{subforum_title}'
_controller: 'Subforum::show'
_arguments:
'subforum_title': 'subforum'
- routePath: '/{subforum_title}/{topic_title}/{page}'
_controller: 'Topic::show'
_arguments:
'subforum_title': 'subforum'
'topic_title': 'topic'
'page': '@widget_0/currentPage'
defaultController: 'Subforum::show'
defaults:
page: '0'
requirements:
page: '\d+'
aspects:
subforum_title:
type: PersistedAliasMapper
tableName: 'tx_blacommunity_domain_model_subforum'
routeFieldName: 'slug'
topic_title:
type: PersistedAliasMapper
tableName: 'tx_blacommunity_domain_model_topic'
routeFieldName: 'slug'
page:
type: StaticRangeMapper
start: '1'
end: '1000'
Setting the defaults page on ‘1’ or ‘0’ has no effect, for pages 2 and further the routing works fine. On the first page ‘@widget_0/currentPage’ cannot be found as an argument. I expected it the work as https://symfony.com/doc/current/routing/optional_placeholders.html: “By adding page to the defaults key, the {page} placeholder is no longer required. “ so e.g.
URL Route Parameters
/blog blog {page} = 1
/blog/1 blog {page} = 1
/blog/2 blog {page} = 2
TYPO3 9.5.1.
Reviews 5
- main 63529[BUGFIX] Allow slashes in enhanced routes having aspects definitions
- 9.5 63655[BUGFIX] Allow slashes in enhanced routes having aspects definitions
- 9.5 60361[BUGFIX] Ensure route defaults and requirements are considered
- main 62885[BUGFIX] Ensure route defaults and requirements are considered
- 9.5 63011[WIP][TASK] Testing current behavior on enhancer defaults & requirements
Related issues 7
- Bug #87436Routing: empty 'defaults' entry does not work
- Bug #87731ExtbasePluginEnhancer requirements ignored
- Task #88686Fix requirements in parameter
- Bug #89185Routing: requirements are not validated for PersistedAliasMapper in PluginEnhancer/ExtbasePluginEnhancer
- Bug #89641Routing configuration with 3rd party url segments
- Bug #90149Consider Symfony route modifier
- Bug #90531Requirements are not considered when an aspect is present