1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Generating sitemap gives an error: System.ArgumentException: An item with the same key has already been added

Generating sitemap gives an error: System.ArgumentException: An item with the same key has already been added

2 posts, 0 answered
  1. Dennis
    Dennis avatar
    0 posts
    Registered:
    05 Jan 2017
    19 Apr
    Link to this post

    Sitefinity in 8.2.5.9 version:

    When we try to generate the sitemap.xml in Administration / Settings / Sitemap nothing appears to be generated and it gives us the error below in log (it is also added to the SitemapConfig.config file):

     

    In log as we can see:

     

    Message: System.ArgumentException: An item with the same key has already been added.
       at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
       at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
       at Telerik.Sitefinity.SitemapGenerator.Impl.SitemapCrawler.GetPageRels(PageNode page, ISite site)
       at Telerik.Sitefinity.SitemapGenerator.Impl.SitemapCrawler.GetPageEntries(ISite site, Int32& count, SitemapScheduledTask task)
       at Telerik.Sitefinity.SitemapGenerator.Impl.SitemapCrawler.GetEntries(Guid siteId, SitemapScheduledTask task)
       at Telerik.Sitefinity.SitemapGenerator.SitemapManager.Start(Guid siteId, SitemapScheduledTask task)

     

    How can we avoid this to happen?

     

     

  2. Dennis
    Dennis avatar
    0 posts
    Registered:
    05 Jan 2017
    19 Apr in reply to Dennis
    Link to this post
    Also if it has more than one file, or duplicated in Administration > User Files > System we can't find any of XMLSitemapGeneratorLibrary item indeed. 
2 posts, 0 answered