Nick Porter's profileNick Porter - SharePoint...BlogLists Tools Help
    8/22/2008

    Microsoft Office SharePoint Server 2007 - SiteMapProviders


    The four main site map providers for Microsoft Office SharePoint Server 2007 specified in the web.config file, all inherit from the same type: Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider
     
    The main difference between these SiteMapProviders is the 'NavigationType' property.
    Every SiteMapProvider uses one of three different NavigationTypes. Global, Combined or Current.
     
    Global = Displays the same navigation as the parent site
    Current = Displays only the navigation items below the current site
    Combined = A combination of both Global and Current navigation

    Looking in the <Providers> section of the web.config file you will see the four main publishing navigation providers. The name of each provider corresponds to the NavigationType specified:
     
    GlobalNavSiteMapProvider
            <add name="GlobalNavSiteMapProvider" description="CMS provider for Global navigation"
    type="Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider, Microsoft.SharePoint.Publishing, Version=12.0.0.0,
    Culture=neutral, PublicKeyToken=71e9bce111e9429c" NavigationType="Global" EncodeOutput="true" />
     
    CombinedNavSiteMapProvider
            <add name="CombinedNavSiteMapProvider" description="CMS provider for Combined navigation"
    type="Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider, Microsoft.SharePoint.Publishing, Version=12.0.0.0,
    Culture=neutral, PublicKeyToken=71e9bce111e9429c" NavigationType="Combined" EncodeOutput="true" />
     
    CurrentNavSiteMapProvider
            <add name="CurrentNavSiteMapProvider" description="CMS provider for Current navigation"
    type="Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider, Microsoft.SharePoint.Publishing, Version=12.0.0.0,
    Culture=neutral, PublicKeyToken=71e9bce111e9429c" NavigationType="Current" EncodeOutput="true" />
     
    CurrentNavSiteMapProviderNoEncode
            <add name="CurrentNavSiteMapProviderNoEncode" description="CMS provider for Current navigation, no encoding of output"
    type="Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider, Microsoft.SharePoint.Publishing, Version=12.0.0.0,
    Culture=neutral, PublicKeyToken=71e9bce111e9429c" NavigationType="Current" EncodeOutput="false" />

     
    Custom SiteMapProviders
     
    If none of the SiteMapProviders above give you what you want, you can easily create your own custom SiteMapProvider.
     
    Just add another line to the <Providers> section of the web.config file specifying a unique name and the 'NavigationType' you want to use.
    For example, if I wanted to create a custom provider which used the 'Combined' NavigationType (like the CombinedNavSiteMapProvider above) but I also wanted to enable security trimming and increase the maximum number of nodes to display from the default of 50 to 100, I would insert the following:

    <add name="MyCustomSiteMapProvider" description="A custom SiteMapProvder that enables localization and security trimming"
    type="Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider, Microsoft.SharePoint.Publishing, Version=12.0.0.0,
    Culture=neutral, PublicKeyToken=71e9bce111e9429c" NavigationType="Combined" EncodeOutput="false" SecurityTrimmingEnabled="True" DynamicChildLimit="100"/>
     
     
    SPNavigationProvider
    The SPNavigationProvider is another provider which can be used for navigation. This provider is generally used for Windows SharePoint Services or MOSS 2007 implementations without the Publishing Feature enabled.
     
    The main difference between this provider and the other ones above is that it inherits from: Microsoft.SharePoint.Navigation.SPNavigationProvider and you can't specify a 'NavigationType'
     
            <add name="SPNavigationProvider" type="Microsoft.SharePoint.Navigation.SPNavigationProvider, Microsoft.SharePoint,
    Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
     
    Personally, I would stay away from using the SPNavigationProvider within MOSS 2007 unless it was absolutely necessary.
     
     
    Next Post: Implementing your SiteMapProvider within the PortalSiteMapDataSource
    8/14/2008

    Manage Content and Structure errors (missing features)

     
    I was using the "Manage Content and Structure" feature of MOSS 2007 when I came across a problem.
     
    When trying to expand one of the site nodes, an error appeared:
    "There was an error in the callback"
     
    Clicking on the actual site name, a new page loaded and I received a different error:
    "Feature 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' for list template 'xxxx' is not installed in this farm.  The operation could not be completed"
     
    I wasn't sure what was happening here because I could still browse to the actual site by typing in the URL. There didn't seem to be any problem.
     
    I took a look at the log files at "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\LOGS"
     
    I did a search on the GUID which appeared in the error and found a match:
    "Failed to determine definition for Feature with ID 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'"
     
    I also noticed quite a few similar entries with different GUIDs

    Cause
    The Site Collection I was using, was originally created on an Enterprise version of MOSS 2007, in a proof of concept environment.
     
    The Site Collection was moved to a Standard version of MOSS 2007 when put into production.
     
    The problem with this was, users had enabled certain 'enterprise only' features on some of the sites and created 'enterprise only' objects, like Reporting Libraries etc.

     
    Resolution
    My solution was simple - delete the enterprise lists and libraries from the problem sites. The data wasn't critical as it was proof of concept only. If your data is critical, the only thing I can suggest to stop the errors from appearing is, to enable the enterprise license.
     
    Otherwise.....
     
    1. Browse to the site and click on 'View all site content'
     
    2. Determine if the site contains any 'Enterprise' lists or libraries
       E.g. Report Library, Data Connection Library, KPI List
     
    3. Record the exact name of each list or library
     
    4. Log on to the local SharePoint server
     
    5. Open a command prompt and change directory to "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\Bin"
     
    6. Execute the following command
        stsadm -o forcedeletelist -url "http://<server>/<site>/<list>/"
     
     
    Once the lists have been successfully deleted, you should be able to use the 'Manage Content and Structure' feature for the site.