SEO package - route to sitemap.xml not resolving

To enable sitemap.xml, I added the following route to Configuration/Routes.yaml as per the manual in front of the TYPO3 Neos subroutes :

##
# Neos Seo: XML Sitemap

-
  name: 'TYPO3 Neos Seo'
  uriPattern: '<TYPO3NeosSeoSubroutes>'
  subRoutes:
    'TYPO3NeosSeoSubroutes':
      package: 'TYPO3.Neos.Seo'
      variables:
        'xmlSitemapPath': 'sitemap.xml'

No other custom routes defined.

When calling http://neos.dev/sitemap.xml I get the following error:

1301610453: Could not resolve a route and its corresponding URI for the given parameters. This may be due to referring to a not existing package / controller / action while building a link or URI. Refer to log and check the backtrace for more details.

And in the log:

WARNING   Flow                 Router resolve(): Could not resolve a route for building an URI for the given route values.
    node => object: TYPO3\TYPO3CR\Domain\Model\Node
    @action => show
    @controller => frontend\node
    @package => typo3.neos
    @format => xml.sitemap

What am I missing?

Personally, I haven’t tried that feature yet - maybe @mgoldbeck knows more?

I might have found the issue: Above seems to happen when the root sitenode is a Shortcut. When I kickstarted a new site with a Page as sitenode, it worked.

Might be worth mentioning in the documentation though to avoid the pitfall for others in the future.

1 Like

Had the same issue,

i could resolve it by setting onlyMatchSiteNodes to false in the routeparts options.

Sounds like bug, could you please report an issue on https://jira.neos.io/browse/NEOS? Thanks!