Project

General

Profile

Actions

Bug #86615

closed

Static route sitemap.xml is not working on single-page tree

Added by Chris Müller over 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2018-10-10
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

I have a single-page tree site configuration. I added a sitemap.xml into the config.yaml via the new Site Management menu.

When I'm calling the /sitemap.xml URL I got a redirect to the default language URL (in my case /en).

My config.yaml:

rootPageId: 3
base: 'https://www.example.net/'
baseVariants:
  -
    base: 'http://example.ddev.local:8080/'
    condition: 'applicationContext == "Development"'
  -
    base: 'https://staging.example.net/'
    condition: 'applicationContext == "Production/Staging"'
  -
    base: 'http://testing.example.net/'
    condition: 'applicationContext == "Testing"'
languages:
  -
    title: English
    enabled: true
    languageId: '0'
    base: /en
    typo3Language: default
    locale: en_US.utf8
    iso-639-1: en
    navigationTitle: English
    hreflang: en
    flag: us
  -
    title: Deutsch
    enabled: true
    languageId: '1'
    base: /de
    typo3Language: de
    locale: de_DE.utf-8
    iso-639-1: de
    navigationTitle: Deutsch
    hreflang: de
    fallbackType: strict
    flag: de
errorHandling:
  -
    errorCode: '404'
    errorHandler: Page
    errorContentSource: 't3://page?uid=96'
routes:
  -
    route: sitemap.xml
    type: uri
    source: 't3://page?uid=3&type=1533906435'                                             

Calling /?type=1533906435 redirects me also to /en. But using /en?type=1533906435 shows me the sitemap index. Calling the URL from the sitemap xml:

https://staging.example.net/en/?page=0&sitemap=pages&type=1533906435&cHash=21d6f07b968ea92541bad77cc36de6f0

shows me the content from /en and no sitemap.

I can reproduce the problem on a local ddev container with nginx, also on a webserver with Apache.

Edit:
I had a similar issue with a robots.txt static route. I defined it via the Site Management module and got a redirect to the start page of the default language.


Related issues 3 (2 open1 closed)

Related to TYPO3 Core - Bug #86616: Content of 404 page is not shownClosed2018-10-10

Actions
Related to TYPO3 Core - Bug #86835: Static route sitemap.xml is still not working on single-page treeNew2018-11-02

Actions
Related to TYPO3 Core - Feature #89518: Decouple static routes from site configUnder Review2019-10-25

Actions
Actions #1

Updated by Chris Müller over 5 years ago

  • Description updated (diff)
Actions #2

Updated by Chris Müller over 5 years ago

  • Category set to Link Handling, Site Handling & Routing
Actions #3

Updated by Georg Ringer over 5 years ago

  • Status changed from New to Accepted

Problem is that the middleware \TYPO3\CMS\Frontend\Middleware\SiteResolver does a redirect if no language is found for base / to the default language and the \TYPO3\CMS\Frontend\Middleware\StaticRouteResolver is called after that and then it is too late

Actions #4

Updated by Gerrit Code Review over 5 years ago

  • Status changed from Accepted to Under Review

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58614

Actions #5

Updated by Georg Ringer over 5 years ago

  • Related to Bug #86616: Content of 404 page is not shown added
Actions #6

Updated by Gerrit Code Review over 5 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58614

Actions #7

Updated by Gerrit Code Review over 5 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58614

Actions #8

Updated by Gerrit Code Review over 5 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58614

Actions #9

Updated by Gerrit Code Review over 5 years ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58614

Actions #10

Updated by Georg Ringer over 5 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #11

Updated by Markus Klein over 5 years ago

  • Related to Bug #86835: Static route sitemap.xml is still not working on single-page tree added
Actions #12

Updated by Benni Mack almost 5 years ago

  • Status changed from Resolved to Closed
Actions #13

Updated by Daniel Goerz over 4 years ago

  • Related to Feature #89518: Decouple static routes from site config added
Actions

Also available in: Atom PDF