Bug #87841

Sitemap generation doesn't take request language into account

Added by Soren Malling 9 months ago. Updated 7 months ago.

Status:
Closed
Priority:
Should have
Category:
SEO
Target version:
Start date:
2019-03-05
Due date:
% Done:

100%

TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The sitemap.xml only takes content from the default language upon creation.

Case:

on domain.dk/sitemap.xml the sitemap is created with all content from the default language (in this case "Danish")

on domain.net/sitemap.xml it was expected to contain only content from the langauge of that site. Instead it takes the content of the default language.

Issue has been identified with Richard Haeser

Sitemaps can be found www.meteko.dk/sitemap.xml and www.meteko.net/sitemap.xml

Site configuration

rootPageId: 1
base: 'https://meteko.dk'
baseVariants: {  }
languages:
  -
    title: Danish
    enabled: true
    languageId: '0'
    base: /
    typo3Language: da
    locale: da_DK.utf-8
    iso-639-1: da
    navigationTitle: ''
    hreflang: da-DK
    direction: ltr
    flag: dk
  -
    title: English
    enabled: true
    languageId: '2'
    base: 'https://meteko.net/'
    typo3Language: default
    locale: en_US.utf-8
    iso-639-1: en
    navigationTitle: English
    hreflang: en-US
    direction: ltr
    fallbackType: strict
    flag: gb
errorHandling:
  -
    errorCode: '404'
    errorHandler: Page
    errorContentSource: '15'
routes: {  }
routeEnhancers:
  NewsPlugin:
    type: Extbase
    extension: News
    plugin: Pi1
    routes:
      -
        routePath: '/{news_title}'
        _controller: 'News::detail'
        _arguments:
          news_title: news
    defaultController: 'News::list'
    aspects:
      news_title:
        type: PersistedPatternMapper
        tableName: tx_news_domain_model_news
        routeFieldPattern: '^(?P<path_segment>.+)$'
        routeFieldResult: '{path_segment}'
  PageTypeSuffix:
    type: PageType
    map:
      sitemap.xml: 1533906435

Related issues

Related to TYPO3 Core - Bug #87912: XML sitemap with localised news records does not respect language Closed 2019-03-14

Associated revisions

Revision fceffe98 (diff)
Added by Richard Haeser 7 months ago

[BUGFIX] Only show records from current language in XML Sitemap

When generating the XML sitemap for records, the language of the
records will be checked. Only records from the current language or
all languages are added to the XML sitemap.

Resolves: #87912
Resolves: #87841
Releases: master, 9.5
Change-Id: Ibc2bc847840ff7ae6d34aa0b0b40fbe163ce2b78
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60629
Tested-by: TYPO3com <>
Tested-by: Soren Malling <>
Tested-by: Georg Ringer <>
Tested-by: Richard Haeser <>
Reviewed-by: Riny van Tiggelen <>
Reviewed-by: Soren Malling <>
Reviewed-by: Georg Ringer <>
Reviewed-by: Richard Haeser <>

Revision ecccdc49 (diff)
Added by Richard Haeser 7 months ago

[BUGFIX] Only show records from current language in XML Sitemap

When generating the XML sitemap for records, the language of the
records will be checked. Only records from the current language or
all languages are added to the XML sitemap.

Resolves: #87912
Resolves: #87841
Releases: master, 9.5
Change-Id: Ibc2bc847840ff7ae6d34aa0b0b40fbe163ce2b78
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60633
Tested-by: TYPO3com <>
Tested-by: Riny van Tiggelen <>
Tested-by: Richard Haeser <>
Reviewed-by: Riny van Tiggelen <>
Reviewed-by: Richard Haeser <>

History

#1 Updated by Richard Haeser 9 months ago

  • Status changed from New to Accepted

#2 Updated by Soren Malling 8 months ago

  • Related to Bug #87912: XML sitemap with localised news records does not respect language added

#3 Updated by Jérémie Roulin 8 months ago

I am facing the same issue. Have a look here to generate a proper localized sitemap : https://support.google.com/webmasters/answer/189077#sitemap

#4 Updated by Gerrit Code Review 7 months ago

  • Status changed from Accepted to Under Review

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

#5 Updated by Richard Haeser 7 months ago

  • Target version set to next-patchlevel

#6 Updated by Gerrit Code Review 7 months ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60633

#7 Updated by Richard Haeser 7 months ago

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

#8 Updated by Gerrit Code Review 7 months ago

  • Status changed from Resolved to Under Review

Patch set 2 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60633

#9 Updated by Gerrit Code Review 7 months ago

Patch set 3 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60633

#10 Updated by Gerrit Code Review 7 months ago

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

#11 Updated by Gerrit Code Review 7 months ago

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

#12 Updated by Richard Haeser 7 months ago

  • Status changed from Under Review to Resolved

#13 Updated by Benni Mack 7 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF