Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Several pages are doubled in the sitemap

Started by Muut Archive 11 years ago · 6 replies · 277 views
11 years ago

I have the sitemap plugin installed. As already stated in the title, some pages are twice present in the sitemap.xml. Don't know why!

11 years ago

Hi, can you identify which pages are duplicated, maybe there's a pattern in the duplication that can help identify why?

11 years ago

This is the sitemap.xml:

XML
<urlset>
  <url>
    <loc>http://swingfield.band</loc>
    <lastmod>2015-08-27</lastmod>
  </url>
  <url>
    <loc>http://swingfield.band/ueber-uns</loc>
    <lastmod>2015-10-02</lastmod>
  </url>
  <url>
    <loc>http://swingfield.band/galerie</loc>
    <lastmod>2015-10-01</lastmod>
  </url>
  <url>
    <loc>http://swingfield.band/galerie</loc>
    <lastmod>2015-10-01</lastmod>
  </url>
  <url> 
    <loc>http://swingfield.band</loc>
    <lastmod>2015-08-27</lastmod>
  </url>
  <url>
    <loc>http://swingfield.band/impressum</loc>
    <lastmod>2015-10-02</lastmod>
  </url>
  <url>
    <loc>http://swingfield.band/ueber-uns</loc>
    <lastmod>2015-10-02</lastmod>
  </url>
  <url>
    <loc>http://swingfield.band/videos</loc>
    <lastmod>2015-10-02</lastmod>
  </url>
</urlset>
11 years ago

Try this: add

$routes = array_unique($pages->routes());

in line 62 of user/plugins/sitemap/sitemap.php, instead of $routes = $pages->routes();. Does that fix it?

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1341 9 years ago
Archive · by Muut Archive, 9 years ago
2 928 9 years ago
Archive · by Muut Archive, 9 years ago
2 4057 9 years ago
Archive · by Muut Archive, 9 years ago
1 2942 9 years ago
Archive · by Muut Archive, 9 years ago
3 1115 9 years ago