Project

General

Profile

Actions

Bug #101045

open

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

Added by Martin Schulz over 1 year ago. Updated over 1 year ago.

Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
SEO
Target version:
-
Start date:
2023-06-14
Due date:
% Done:

0%

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

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.


Related issues 1 (1 open0 closed)

Related to TYPO3 Core - Bug #91670: Not possible to exclude "mountpoints" from sitemap using "excludedDoktypes"New2020-06-17

Actions
Actions #1

Updated by Markus Klein over 1 year ago

  • Subject changed from ext:seo sitmap ignores the fact that pages doktype is localizable to ext:seo sitemap ignores the fact that pages doktype is localizable
Actions #2

Updated by Guido Schmechel over 1 year ago

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
}
}
}
}
Actions #3

Updated by Gerrit Code Review over 1 year ago

  • Status changed from New to Under Review

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

Actions #4

Updated by Gerrit Code Review over 1 year ago

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

Actions #5

Updated by Markus Klein 3 months ago

  • Related to Bug #91670: Not possible to exclude "mountpoints" from sitemap using "excludedDoktypes" added
Actions

Also available in: Atom PDF