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

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 0 answered
  1. Dennis
    Dennis avatar
    0 posts
    Registered:
    05 Jan 2017
    19 Apr 2017
    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 2017 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