Issue Bug Closed

#109543Speaking URL generation of extbase plugins using RecordsXmlSitemapDataProvider not working anymore

Alexander Grein 04/10/26, 12:49 updated 04/21/26, 11:30

Description

After this commit, urls generated in sitemaps are not speaking anymore:
https://github.com/TYPO3/typo3/commit/982712fb28deca6c4adcd7f7edbd3641cb831129

Example config.yaml:

ExtensionName:
    type: Extbase
    extension: ExtensionName
    plugin: Pi1
    routes:
      -
        routePath: '/{slug-part}'
        _controller: 'News::detail'
        _arguments:
          slug-part: news
    defaultController: 'News::detail'
    aspects:
      slug-part:
        type: PersistedAliasMapper
        tableName: tx_news_domain_model_news
        routeFieldName: slug

setup.typoscript (uses RecordsXmlSitemapDataProvider):
https://docs.typo3.org/permalink/typo3-cms-seo:xmlsitemap-data-providers-records

Reviews 1

History 67

  1. Alexander Grein commented <span data-processor="relativetime" data-value="2026-04-10T12:57:09+00:00" > 04/10/26, 12:57 </span>

    Hint: The example config.yaml doesn’t fit exactly to the setup.typoscript

  2. Garvin Hicking commented <span data-processor="relativetime" data-value="2026-04-10T14:18:50+00:00" > 04/10/26, 14:18 </span>

    Quoted from slack:

    When changing the core code to this, it works:

    protected function defineUrl(array $data): array
        {
            $pageId = $this->request->getAttribute('frontend.page.information')->getId();
            $pageId = $this->config['url']['pageId'] ?? $pageId;
            $additionalParams = $this->getUrlFieldParameterMap($data['data']);
            $additionalParams = $this->getUrlAdditionalParams($additionalParams);
            $additionalParamsString = http_build_query(
                $additionalParams,
                '',
                '&',
                PHP_QUERY_RFC3986
            );
            $data['loc'] = $this->cObj->typoLink_URL([
                'parameter' => $pageId,
                'additionalParams' => $additionalParamsString ? '&' . $additionalParamsString : '',
                'forceAbsoluteUrl' => 1,
            ]);
    
            return $data;
        }
  3. Benni Mack commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-04-12T15:00:08+00:00" > 04/12/26, 15:00 </span>

    Applied in changeset commit:2ea99067c5927ae807c9ab0bfcdc3a5cc4590356.