TYPO3 routing does not work with pagination (or I don't know how)

Issue #67 open
Wolfgang Klinger created an issue

TYPO3 10, Extension version 2.2.0

I tried the following configuration

  Album:
    type: Extbase
    extension: FsMediaGallery
    plugin: Mediagallery
    namespace: tx_fsmediagallery_mediagallery
    routes:
      - routePath: '/album/{collection_title}/{page}'
        _controller: 'MediaAlbum::showAlbum'
        _arguments:
          collection_title: 'mediaAlbum'
          page: '@widget_assets/currentPage'
    defaults:
      page: '1'
    defaultController: 'MediaAlbum::showAlbum'
    aspects:
      collection_title:
        type: PersistedAliasMapper
        tableName: sys_file_collection
        routeFieldName: slug
      page:
        type: StaticRangeMapper
        start: '1'
        end: '1000'

The album view works with a nice URL, but the pagination links are with GET parameters (and missing any album information), e.g.

https://myhost/pictures?tx_fsmediagallery_mediagallery%5B%40widget_assets%5D%5BcurrentPage%5D=2&cHash=8bdd7dd6611f0e663f259f7b000c109b

I get nice URLs for the album link, e.g.:

https://myhost/pictures/my-album-title/

this works, but not with pagination.

If I open the album page with a complete URL with only GET parameters (routing configuration disabled), then enable the routing configuration, clear the cache and reload the page, I get nice pagination links like

https://myhost/pictures/my-album-title/2

but this always leads to a 404 error.

Please give me a working example for that requirement, thanks!

Comments (4)

  1. Frans Saris repo owner

    @Wolfgang Klinger maybe its related to the issue described in #64. Update to latest 2.x version and make sure all the <f:widget.link tags in your template hold addQueryStringMethod="GET"

  2. Log in to comment