Copied to clipboard

Flag this post as spam?

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


  • Tony 5 posts 25 karma points
    May 27, 2010 @ 18:05
    Tony
    0

    UmbracoSiteMapProvider web.config setting in version 4.0.2.1

    In an attempt to speed up the publishing routines, I set the 'sitemap' setting in the web.cofig to 'false' as I have no need for sitemaps. The application then throws an error since it is expecting to find a sitemap type in method call umbraco.content.PublishNodeDo(....)

    Wrapping the problem code block fixes the error, but it would be nice to have the core code read the web.config setting rather than

    swalling the exception (maybe it's been done in a later version?)

                    try
                    {
                        if (SiteMap.Provider is presentation.nodeFactory.UmbracoSiteMapProvider)
                        {
                            presentation.nodeFactory.UmbracoSiteMapProvider prov = (presentation.nodeFactory.UmbracoSiteMapProvider)SiteMap.Provider;
                            prov.UpdateNode(new umbraco.presentation.nodeFactory.Node(d.Id));
                        }
                    }
                    catch (InvalidOperationException) { }

Please Sign in or register to post replies

Write your reply to:

Draft