Project

General

Profile

Actions

Bug #94585

closed

Siteconfig - 404 error not triggered if routeEnhancers is configured

Added by Cyril Janody almost 3 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2021-07-19
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.4
Tags:
Slug routeHandling errorHandling
Complexity:
Is Regression:
Yes
Sprint Focus:
On Location Sprint

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'

Files

clipboard-202109091622-ny5kn.png (19.4 KB) clipboard-202109091622-ny5kn.png Philipp Lüdtke, 2021-09-09 14:22

Related issues 3 (1 open2 closed)

Related to TYPO3 Core - Bug #95072: Custom aspect leads to list view on hidden elementsClosedOliver Hader2021-09-01

Actions
Related to TYPO3 Core - Bug #94510: SiteConfig with a config for a not available extension breaks errorHandling e. g. 404 pageClosed2021-07-08

Actions
Related to TYPO3 Core - Task #99046: DOCS: Routing Troubleshooting SectionNew2022-11-10

Actions
Actions

Also available in: Atom PDF