Bug #86835
openStatic route sitemap.xml is still not working on single-page tree
0%
Description
The bug #86615 already exists after an update to TYPO3 9.5.1.
I have a multi-language, single-page tree site configuration. I added a sitemap.xml into the config.yaml via the new Site Management menu.
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'
Using /sitemap.xml redirects me to /en/.
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:
http://example.ddev.local:8080/en/?sitemap=pages&cHash=0fe835841492c3b52e6090c6a7f6f310
shows me the content from /en and no sitemap.
Addition: I encounter this problem on a local ddev environment with the default .htaccess delivered with the core.
Updated by Markus Klein about 6 years ago
- Related to Bug #86615: Static route sitemap.xml is not working on single-page tree added
Updated by Georg Ringer about 6 years ago
- Related to Bug #87095: Robots.txt not reachable if base is not "/" added
Updated by Andreas Kießling over 5 years ago
@Chris Müller
Does this work for you now? I'm having serious trouble getting the sitemap to work at all, neither / nor /de/ as base language segment works for me
Updated by Andreas Kießling over 5 years ago
The topic of this report is wrong, it's not just the sitemap.xml, but in general all static routes and redirects are screwed up, if there is no entrypoint with just a "/"
--Update--
I think i found the culprit: the SiteBaseRedirect should only kick in, in the documented case:
// Usually called when "https://www.example.com" was entered, but all sites have "https://www.example.com/lang-key/" // So a redirect to the first possible language is done.
But since there is no check, if the called url is actually "empty", it just handles everything that can not be mapped to a configured language.
Updated by Chris Müller over 5 years ago
- Related to Bug #88543: Static routes does not work if no language serves root level added
Updated by Susanne Moog over 5 years ago
This is basically done on purpose, as you can have multiple sites with the same base and different language configurations.
If two sites had / as base (and lang configs) which static route config is to be taken? The configuration in this case is undefined and instead of doing unpredictable "magic" by chosing any one of them, we are currently only using the config that is defined.
Updated by Chris Müller over 5 years ago
I agree. For me, this issue can be closed.
Updated by Sebastian Schawohl over 5 years ago
I don't understand: static routes are defined per sites, so even if two sites have / as base it should not be a problem.
The only way to make static routes work in a multi-language site is to have the default language with / as a base?
Updated by Daniel Goerz about 5 years ago
- Related to Bug #88902: Redirects are not resolved if there is a base path in default site added
Updated by Daniel Goerz about 5 years ago
Susanne Moog wrote:
This is basically done on purpose, as you can have multiple sites with the same base and different language configurations.
If two sites had / as base (and lang configs) which static route config is to be taken? The configuration in this case is undefined and instead of doing unpredictable "magic" by chosing any one of them, we are currently only using the config that is defined.
We tried to find a solution for all use cases but unfortunately this is not possible with the current architecture of static routes. The main design flaw is that static routes are bound to sites but sites do not have to be exclusive in terms of their base. This leads to an arbitrary static route resolving.
To circumvent the current restriction on site configurations that have no dedicated entry point "/
" please consider rearranging the Middlewares in your installation. Refer to the documentation on how this can be achieved: https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/RequestHandling/Index.html#override-ordering-of-middlewares
In the long run we need to decouple static routes from site configuration and treat them more like redirects are treated now. They need to be globally defined to remove the arbitrariness when resolving. In this case we could think about serving them in a dedicated sysext (like redirects) because then the functionality could be removed completely if not needed (to reduce bloat).
Updated by Daniel Goerz about 5 years ago
- Related to Feature #89518: Decouple static routes from site config added
Updated by Tymoteusz Motylewski about 5 years ago
- Related to Bug #87087: StaticRouteResolver ignores additional parameters added
Updated by Tymoteusz Motylewski about 5 years ago
- Related to Bug #87817: PageLinkBuilder fails adding pagetype parameter, if routeEnhancers for PageTypeSuffix is defined added
Updated by Tymoteusz Motylewski about 5 years ago
- Related to Bug #88836: page type not respected under some circumstances added
Updated by Tymoteusz Motylewski about 5 years ago
- Related to Bug #89346: sitemap.xml does not work correctly added
Updated by Tymoteusz Motylewski about 5 years ago
- Related to Bug #87104: PageTypeSuffix removes type parameter for non mapped type values added
Updated by Tymoteusz Motylewski about 5 years ago
- Related to Bug #87016: Seo sitemap does not note routeEnhancer on extensions added
Updated by Susanne Moog almost 5 years ago
- Sprint Focus set to On Location Sprint
Updated by Daniel Goerz almost 5 years ago
- Related to deleted (Bug #88543: Static routes does not work if no language serves root level)
Updated by Daniel Goerz almost 5 years ago
- Has duplicate Bug #88543: Static routes does not work if no language serves root level added
Updated by Loon Buster almost 5 years ago
somebody have nothing better to do than to put unfinished system online? .. oh wait free T3v8 support until "2020-03-31" ..incompetent or calculating? i thing it's just financed foresight :)
Updated by Markus Mächler almost 5 years ago
Couldn't we use the reordering feature switch rearrangedRedirectMiddlewares that has been used to fix the same problem with redirects?
https://forge.typo3.org/issues/88902
https://forge.typo3.org/projects/typo3cms-core/repository/revisions/ffd69f0bc8ebf23dbb4d736a058746bbbde5f08d/diff/typo3/sysext/redirects/Configuration/RequestMiddlewares.php
Updated by Susanne Moog almost 5 years ago
Markus Mächler wrote:
Couldn't we use the reordering feature switch rearrangedRedirectMiddlewares that has been used to fix the same problem with redirects?
https://forge.typo3.org/issues/88902
https://forge.typo3.org/projects/typo3cms-core/repository/revisions/ffd69f0bc8ebf23dbb4d736a058746bbbde5f08d/diff/typo3/sysext/redirects/Configuration/RequestMiddlewares.php
Yes, as Daniel stated in #11 this is a valid work around in your projects - however, it is not a solution we could use in the core for the issues and cases mentioned above.
Updated by Markus Mächler almost 5 years ago
Thanks for the explanations. What about including this with the same feature switch and throwing an InvalidSiteConfigurationException or something in case two sites with the same base but different language settings define the same static route? This could be an intermediate step for TYPO3 10 LTS until static routes are redesigned completely.
Updated by Bernhard Eckl over 3 years ago
- Related to Bug #94244: PageTypeSuffix Enhancer buggy added
Updated by Susanne Moog about 2 years ago
This should be solved if #89518 is done - it's currently pending and you could help out by reviewing and testing the patch.
Updated by Benni Mack over 1 year ago
- Sprint Focus deleted (
On Location Sprint)