Issue Bug Closed

#106519Ext:seo custom sitemap templates won't work. (config key template not interpreted)

Florian Schuhmann 04/08/25, 09:27 updated 12/02/25, 14:22

Description

To get a google-specific sitemap for news or videos, it was possible to specify a separate template for rendering the sitemap like described in the docs at https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/Seo/XmlSitemap.html#for-records

This procedure is also used in EXT:news:
https://github.com/georgringer/news/blob/main/Configuration/TypoScript/SeoSitemap/setup.typoscript#L14-L15

Since the changes in the following patchset, the above configuration no longer works.
https://forge.typo3.org/issues/98914
https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.1/Feature-98914-TypoScriptAsRequestAttribute.html

The affected class is XmlSitemapRenderer::renderSitemap from EXT:seo

- $template = ($sitemapConfig['config']['template'] ?? false) ?: 'Sitemap';
+ $template = $sitemapConfig['template'] ?? 'Sitemap';

With this change, the config key ‘template’ was move from
@plugin.tx_seo.config.xmlSitemap.sitemaps.<dedicated_sitemap>.config.template@<br>to<br>@plugin.tx_seo.config.xmlSitemap.sitemaps.<dedicated_sitemap>.template@</dedicated_sitemap></dedicated_sitemap>

Reviews 3