Bug #101045
openext:seo sitemap ignores the fact that pages doktype is localizable
0%
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
- duplicate links in the sitemap
- 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.
This is true for TYPO3 10–12.
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
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
}
}
}
}
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
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
Updated by Markus Klein 3 months ago
- Related to Bug #91670: Not possible to exclude "mountpoints" from sitemap using "excludedDoktypes" added