Issue Bug Closed

#89422routeEnhancers + pagination

Grigory Rechkin 10/15/19, 15:28 updated 12/17/21, 14:38

Description

Fluid widget pagination links don’t keep the initial query parameters if they were converted by the routeEnhancer.

https://github.com/TYPO3/TYPO3.CMS/blob/9.5/typo3/sysext/fluid/Classes/ViewHelpers/Widget/LinkViewHelper.php
GetWidgetUri() adds query parameters to a current query but the current query has already been modified by the route enhancer and doesn’t keep query params as expected by uriBuilder here. Might be I’m missing something?

For example:
1. List of persons
2. Detailed view for each person
3. Paginated list of additional records for that person in a detailed view

Route enhancer:

routeEnhancers:
  DoctorsPlugin:
    type: Extbase
    extension: Doctors
    plugin: List
    routes:
      - { routePath: '/', _controller: 'Person::index'}
      - { routePath: '/{identifier}', _controller: 'Person::index', _arguments: { identifier: 'doctor' } }
      - { routePath: '/{identifier}/page-{page}', _controller: 'Person::index', _arguments: { identifier: 'doctor', page: '@widget_0/currentPage' } }
    defaultController: 'Person::index'
    defaults:
      page: '0'
    aspects:
      identifier:
        type: PersistedAliasMapper
        tableName: tx_doctors_person
        routeFieldName: slug
      page:
        type: StaticRangeMapper
        start: '1'
        end: '25'

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.