Issue Bug Closed

#88836page type not respected under some circumstances

Chris Müller 07/24/19, 14:06 updated 02/27/20, 12:42

Description

In the site configuration I have the following configuration:

...
routeEnhancers:
  Suffix:
    type: PageType
    default: /
    index: ''
    map:
      /: 0
      yoast-snippetpreview.json: 1480321830
...

When I now generate the XML index sitemap (with type 1533906435) I don’t get the type in the sitemap URLs, so the link shows the home page instead of the pages XML sitemap:

<sitemap>
  <loc>https://website.ddev.local:8443/de/?sitemap=pages&amp;cHash=0fe835841492c3b52e6090c6a7f6f310</loc>
  <lastmod>2019-07-24T09:30:35+02:00</lastmod>
</sitemap>

But if I remove the routeEnhances.Suffix part, the type is respected:

<sitemap>
  <loc>https://website.ddev.local:8443/de/?sitemap=pages&amp;type=1533906435&amp;cHash=0fe835841492c3b52e6090c6a7f6f310</loc>
  <lastmod>2019-07-24T09:30:35+02:00</lastmod>
</sitemap>

Reviews 5