news icon indicating copy to clipboard operation
news copied to clipboard

Category menu and news list breaking on same page with frontend routing activated

Open fsuter opened this issue 8 months ago • 10 comments

Bug Report

Current Behavior I have a page with two news plugins installed: the category menu (CategoryList) and the standard news list (Pi1). When I click on a category, I get the following error:

The controller "News" is not allowed by plugin "CategoryList". Please check for TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin() in your ext_localconf.php.

When there's no frontend routing configuration (i.e. no speaking URLs), this does not happen.

I have the following frontend routing configuration:

routeEnhancers:
  NewsPlugin:
    type: Extbase
    namespace: tx_news_pi1
    defaultController: 'News::list'
    routes:
      -
        routePath: '/article/{news-title}'
        _controller: 'News::detail'
        _arguments:
          news-title: news
      -
        routePath: '/cat/{category-name}'
        _controller: 'News::list'
        _arguments:
          category-name: overwriteDemand/categories
    aspects:
      news-title:
        type: NewsTitle
      category-name:
        type: NewsCategory

I have tried the configuration from the documentation: https://docs.typo3.org/p/georgringer/news/11.2/en-us/Tutorials/BestPractice/Routing/Index.html#basic-setup-including-categories-tags-and-the-rss-atom-feed and many other variants, all to no avail.

Digging into the Extbase RequestBuilder, where the error happens, I can see that the default values are as expected (pointing to the CategoryController) but they are overridden by the query parameters (which point to the "list" action of the NewsController).

I'm not sure whether this is an Extbase issue, a routing (configuration) issue or really a "news" issue, but at least the extension documentation seem to indicate that two plugins can co-exist on the same page, whereas my current experience shows the contrary.

Expected behavior/output Being able to the the category menu and the news list on the same page. The category menu should show the active category and the news list should be filtered according to the selected category.

Environment

  • TYPO3 version(s): 12.4.7
  • news version: 11.2.0
  • Is your TYPO3 installation set up with Composer (Composer Mode): yes
  • OS: OSX 14.0

fsuter avatar Nov 01 '23 08:11 fsuter