Project

General

Profile

Actions

Bug #86895

closed

routeEnhancer not working correct for paginate widget

Added by Jacco van der Post over 5 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2018-11-09
Due date:
% Done:

100%

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

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.


Related issues 7 (0 open7 closed)

Related to TYPO3 Core - Bug #87436: Routing: empty 'defaults' entry does not workClosed2019-01-15

Actions
Related to TYPO3 Core - Bug #90149: Consider Symfony route modifierClosed2020-01-19

Actions
Related to TYPO3 Core - Bug #87731: ExtbasePluginEnhancer requirements ignoredClosed2019-02-18

Actions
Related to TYPO3 Core - Task #88686: Fix requirements in parameterClosed2019-07-04

Actions
Related to TYPO3 Core - Bug #89641: Routing configuration with 3rd party url segmentsClosed2019-11-11

Actions
Related to TYPO3 Core - Bug #90531: Requirements are not considered when an aspect is presentClosed2020-02-25

Actions
Related to TYPO3 Core - Bug #89185: Routing: requirements are not validated for PersistedAliasMapper in PluginEnhancer/ExtbasePluginEnhancerClosed2019-09-17

Actions
Actions

Also available in: Atom PDF