Issue Bug Under Review Orphaned

#101045ext:seo sitemap ignores the fact that pages doktype is localizable

Martin Schulz 06/14/23, 07:00 updated 01/19/25, 15:31

Description

By default, a page’s doktype can change upon translation; thus, a default page can be an external link on any translation and vice versa. For example:

Page A 
lang: default, doktype: standard page
translation: fr, doktype: external link to www.foo.de

Page B 
lang: default, doktype: standard page
translation: fr, doktype: external link to www.foo.de

Page C
lang: default, doktype: external link to www.bar.de
translation: fr, doktype: standard page

On the FR sitemap, this leads to:

Page A (visible) (Entry: www.foo.de)
Page B (visible) (Entry: www.foo.de)
Page C (not visible)

Problem

  1. duplicate links in the sitemap
  2. inconsistent behavior (some external links are visible, some are not; some default pages are visible, some are not)

The sitemap should respect doktype filters (and other localizable ones) properly in all languages.
I understand that TYPO3 does filtering on the default language level only at many places, but this is inconsistent behavior.

see: https://github.com/TYPO3/typo3/blob/main/typo3/sysext/seo/Classes/XmlSitemap/PagesXmlSitemapDataProvider.php

This is true for TYPO3 10–12.

Reviews 1

History 36

  1. Markus Klein changed subject ext:seo sitmap ignores the fact that pages doktype is localizable ext:seo sitemap ignores the fact that pages doktype is localizable <span data-processor="relativetime" data-value="2023-07-10T11:29:23+00:00" > 07/10/23, 11:29 </span>

  2. Guido Schmechel commented <span data-processor="relativetime" data-value="2023-08-09T15:36:46+00:00" > 08/09/23, 15:36 </span>

    The same problem concerns the canonical field.

    Example:
    We have a client (SingleNode) with the languages DE and EN. For an EN page we now specify a canonical.

    Result:
    The page is still output in the sitemap.xml because of the DE canonical_link = ‘’ query.

    Background:
    Using the query in getPages() in PagesXmlSitemapDataProvider we get all DE pages. Via generateItems the overlays are fetched and all filter methods (canonical, doktype and more) are ignored.

    Possible solution v13:
    - We first fetch all pages of the default language and filter the result afterwards
    - Remove TypoScript Condition for the canonical field
    - Introduce a new constant for canonical fields (excldueCanonicalPages = 1 / Default on)
    - Introduce PSR-14 events (separate issue) to change pages results

    Workaround:

    Use a custom provider via TypoScript

    config {
    xmlSitemap {
    sitemaps {
    pages {
    provider = TYPO3\CMS\Seo\XmlSitemap\PagesXmlSitemapDataProvider
    }
    }
    }
    }