Copied to clipboard

Flag this post as spam?

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


  • Len Dierickx 150 posts 92 karma points
    Oct 21, 2009 @ 11:00
    Len Dierickx
    0

    sitemapprovider error after upgrade from 305 to 4.0.2.1

    We moved our system from 305 to Umbraco 4 and we are getting errors logged for each url/page in the system and the errors are related to the sitemap provider.

    The log table gets filled up pretty fast, and it seems to be triggered every-time someone publishes a page. The number of error logged corresponds to the number of pages we have, so for each page, there is an error.

    Did anybody have this problem this before?

    How did you fix it?

    Details:

    • Umbraco version 4.0.2.1

    • ASP.net 2.0.50727

    • Windows server 2003

    • MS SQL 2000

    Number of errors with the SiteMapProvider from UmbracoLog Table

    NR        Y          M         D          H
    4369     2009     10         8          1
    4369     2009     10         7          19
    4370     2009     10         7          17
    4363     2009     10         6          20
    4363     2009     10         6          18

    Error:

    Error adding to SiteMapProvider: System.Web.HttpException: 
    'http://www.eurofins.dk/nyheder/update-milj0.aspx'
     is not a valid virtual path.    
     at System.Web.Util.UrlPath.CheckValidVirtualPath(String path)    
     at System.Web.Util.UrlPath.Combine(String appPath, String basepath, String relative)     
    at System.Web.StaticSiteMapProvider.AddNode(SiteMapNode node, SiteMapNode parentNode)    
     at umbraco.presentation.nodeFactory.UmbracoSiteMapProvider.loadNodes(String parentId, SiteMapNode parentNode)

    Modifing the following methods by removing the "http://" seems to stop the errors in the the log table.

    method umbraco.presentation.nodeFactory.UmbracoSiteMapProvider.UpdateNode(Node node)

    Code that seems to fix this issue:

    //(line 87)
    //replace
    //node.Url
    //by
    node.Url.IndexOf("http://")>=0 ? node.Url.Replace("http://","") : node.Url
    method umbraco.presentation.nodeFactory.UmbracoSiteMapProvider.loadNodes(string parentId, SiteMapNode parentNode)
    //(line127)
    //replace in the
    //child.Url,
    //by
    child.Url.Contains("http://") ? child.Url.Replace("http://", string.Empty) : child.Url,
    
  • Len Dierickx 150 posts 92 karma points
    Oct 26, 2009 @ 18:18
    Len Dierickx
    0

    Hey, 

    Anyone?

    Maybe someone from the core team can a look?

    Thx, Len. 

  • Niels Hartvig 1951 posts 2391 karma points c-trib
    Oct 26, 2009 @ 19:43
    Niels Hartvig
    0

    There's a bug in the Umbraco core that doesn't check if niceurl returns a domain as well. We'll fix that.

Please Sign in or register to post replies

Write your reply to:

Draft