Issue Bug Closed

#94585Siteconfig - 404 error not triggered if routeEnhancers is configured

Cyril Janody 07/19/21, 14:59 updated 11/10/22, 11:55

Description

Hi guys,

We encounter a bug with the handling of invalid URLs when the routeEnhancers section is configured.

In fact, https://myDomain.com/xyz shows us the home page instead of triggering a 404 error whereas using raw URLs with an invalid id argument properly works.

Did we miss something?

base: '%env(BASE_URL)%'
baseVariants: {  }
errorHandling:
  - errorCode: '404'
    errorHandler: Page
    errorContentSource: 't3://page?uid=404'
languages:
  -
    title: Français
    enabled: true
    base: /
    typo3Language: fr_CA
    locale: fr_CA.UTF-8
    iso-639-1: fr
    navigationTitle: Français
    hreflang: fr-CA
    direction: ltr
    flag: qc
    languageId: '0'
  -
    title: English
    enabled: true
    base: /en/
    typo3Language: default
    locale: en_CA.UTF-8
    iso-639-1: en
    navigationTitle: English
    hreflang: en-CA
    direction: ltr
    fallbackType: strict
    fallbacks: '1'
    flag: ca
    languageId: '1'
rootPageId: 1
routeEnhancers:
  News:
    type: Extbase
    extension: News
    plugin: Pi1
    routes:
      - routePath: '/{news-title}'
        _controller: 'News::detail'
        _arguments:
          news-title: news
    defaultController: 'News::results'
    aspects:
      news-title:
        type: PersistedAliasMapper
        tableName: tx_news_domain_model_news
        routeFieldName: path_segment
routes:
  - route: robots.txt
    type: staticText
    content: |
      User-agent: *
      Allow: /
      Disallow: none
  - route: sitemap.xml
    type: uri
    source: 't3://page?uid=1&type=1533906435'

Reviews 0

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