Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Sebastiaan Janssen 5044 posts 15475 karma points MVP admin hq
    Dec 07, 2009 @ 12:14
    Sebastiaan Janssen
    1

    Disabling sitemap provider throws exception

    This seems like a bit of a bug to me, just verifying it before I put it in the CodePlex:

    If I disable the sitemap provider in the web.config:

    <siteMap defaultProvider="UmbracoSiteMapProvider" enabled="false">

    Then I get an exception while publishing ("This feature is currently disabled, please enable section system.web/siteMap in the configuration file.").

    So I checked the Umbraco source code and found that it's doing a type check, so by completely commenting out/deleting the sitemap provider section I can avoid this exception (and that worked).

    As far as I can tell, the sitemap provider is never actually used out of the box, so I'm unsure why it's even enabled by default?

    Anyway, seems to me that there needs to be a check if enabled="true" and only then a check to see if the UmbracoSiteMapProvider is present.

  • Sebastiaan Janssen 5044 posts 15475 karma points MVP admin hq
    Dec 07, 2009 @ 15:42
    Sebastiaan Janssen
    0

    Furthermore, I have a multisite structure like this:

    - site1
     - somenode1
     - categories
      - category 1
      - category 2

    - site2
     - somenode2
     - categories
      - category 1
      - category 2

    As you can see, the category tree is the same for each site. 

    When the sitemap provider is enabled I, it does not take the hostname into account and it throws exceptions like this:

    Error adding to SiteMapProvider: System.InvalidOperationException: 
    Multiple nodes with the same URL '/categorie/category-1.aspx' were found. 
    XmlSiteMapProvider requires that sitemap nodes have unique URLs.     
     at System.Web.StaticSiteMapProvider.AddNode(SiteMapNode node, SiteMapNode parentNode)     
     at umbraco.presentation.nodeFactory.UmbracoSiteMapProvider.loadNodes(String parentId, SiteMapNode parentNode)

    But this is not a correct assessment of what "the same URL" is as the hostname prefix is missing.

    As I have about 8000 nodes currently, it seems like all these exceptions are also slowing down the publish action. If I comment out the sitemap provider section, a publish feels snappier (though, I haven't actually timed it).

  • Andres Tenjo 35 posts 55 karma points
    Sep 29, 2011 @ 18:42
    Andres Tenjo
    0

    sorry Sebastiaan one question about "it does not take the hostname into account" I have my global hostname configured, and I get many error like.. Error adding to SiteMapProvider:System.InvalidOperationException: ... error What can I do to resolve that ?

  • Dan 1285 posts 3917 karma points c-trib
    Jun 29, 2012 @ 21:15
    Dan
    0

    Hi Sebastiaan,

    Old thread I know, but since I'm still getting the same error when disabling sitemap in web.config (with 4.7.2) I wondered if the issue was reported on Codeplex?  I've done a search there but can't spot it.

    Otherwise do you know of a work-around?

    Thanks!

  • Jonas Hilmersson 7 posts 28 karma points
    Jul 26, 2012 @ 16:01
    Jonas Hilmersson
    1

    Hi,

    I have the same experience, I also have a multisite structure with possibly duplicate node names. I've tried to set different hostnames for each root node, but the error "Multiple nodes with the same URL" still shows up. Disabling the sitemapProvider in web.config makes editing stop working, but commenting it out works. 

    Brgds

     

    Jonas

  • Edwin van Koppen 156 posts 270 karma points
    Jan 24, 2013 @ 09:00
    Edwin van Koppen
    0

    The error is still current.. got the same. It's a easy fix in think, can it be added to Umbraco 6?

  • Edwin van Koppen 156 posts 270 karma points
    Jan 24, 2013 @ 09:02
    Edwin van Koppen
    2

    Commenting is out works.

  • Marcio Goularte 374 posts 1346 karma points
    Oct 06, 2016 @ 15:11
Please Sign in or register to post replies

Write your reply to:

Draft