Bug #87910

ExtbasePluginEnhancer won't work on same page or without page limitation

Added by Stefan Berger 6 days ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2019-03-14
Due date:
% Done:

0%

TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Hi,

if you define 2 ExtbasePluginEnhancer of the same extension and plugin without a page limitation or on the same page, then only the later defined PluginEnhancer will remain for route matching. We are using the newest version 9.5.5.

Here the example config without a page limitation:

routeEnhancers:
  NewsPlugin:
    type: Extbase
    extension: News
    plugin: Pi1
    routes:
      - { routePath: '/news/{news_title}', _controller: 'News::detail', _arguments: {'news_title': 'news'} }
    defaultController: 'News::detail'
    aspects:
      news_title:
        type: PersistedAliasMapper
        tableName: 'tx_news_domain_model_news'
        routeFieldName: 'path_segment'
  NewsListPlugin:
    type: Extbase
    extension: News
    plugin: Pi1
    routes:
      - { routePath: '/list/{page}', _controller: 'News::list', _arguments: {'page': '@widget_0/currentPage'} }
    defaultController: 'News::list'
    defaults:
      page: '0'
    requirements:
      page: '\d+'
    aspects:
      page:
        type: StaticRangeMapper
        start: '1'
        end: '100'

It seems, that the name for the route collection is not unique enough: @see \TYPO3\CMS\Extbase\Routing\ExtbasePluginEnhancer::enhanceForMatching

Thanks for fixing the issue.

Also available in: Atom PDF