'How to generate Sitemap in Strapi v3.6.8 with strapi-plugin.sitemap v1.2.5

I am using Strapi v3.6.8 and installed strapi-plugin-sitemap 1.2.5.

After I fill the data in the plugin:

  • Hostname: localhost:1337
  • Include home page: ON
  • Exclude drafts: ON

I also enabled all of the possibilities in the Settings for public and authenticated roles.

And choose my Content Type -> Page with filled UID Field, with "priority 1", change request "always" and area "area".

When I click the generate sitemap I get error "An Error occurred" and nothing happens.

When I am trying to access http://localhost:1337/sitemap/ I get an error :

{
  "statusCode":500,
  "error":"Internal Server Error",
  "message":"An internal server error occurred"
}

What am I doing wrong ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source