I was seeing this error the other day on our test publishing site, and tracked it down to an issue in the web.config file. Seems like our web.config was using the wrong default provider:
<siteMap defaultProvider="CurrentNavSiteMapProvider" enabled="true">
where it should have been to set to:
<siteMap defaultProvider="CurrentNavigation" enabled="true">
A resource for tips and solutions involving SharePoint and .NET Development
Tuesday, December 14, 2010
Tuesday, December 7, 2010
EditModePanel Hiding Content in SharePoint 2010
It appears that the functionality of the EditModePanel has changed subtly in SharePoint 2010. When using PageDisplayMode="Display", like this:
<PublishingWebControls:EditModePanel runat="server" CssClass="editpanel" PageDisplayMode="Display" ID="editmodepanel1">
lorem ipsum dum dolor
</PublishingWebControls:EditModePanel>
in 2007 the content would show to all users when the publishing page is in display mode. In 2010, the content will only show to users that have permission to edit the page. A subtle change to be aware of.
<PublishingWebControls:EditModePanel runat="server" CssClass="editpanel" PageDisplayMode="Display" ID="editmodepanel1">
lorem ipsum dum dolor
</PublishingWebControls:EditModePanel>
in 2007 the content would show to all users when the publishing page is in display mode. In 2010, the content will only show to users that have permission to edit the page. A subtle change to be aware of.
Monday, December 6, 2010
Stapler feature GLOBAL#0 doesn't staple
When adding feature staplers, you can add individual site templates to activate the feature staplee like so:
<FeatureSiteTemplateAssociation Id="c9a041c2-f258-4290-bfa9-96c854a12b24" TemplateName="SPSNEWS#0"/>
where the ID is the Staplee feature ID, and the TemplateName is the [WebTemplate Name]#[Web Template ID].
But when trying to associate ALL site templates, you've got to drop the #[Web Template ID] to get it to work, like this:
<FeatureSiteTemplateAssociation Id="c9a041c2-f258-4290-bfa9-96c854a12b24" TemplateName="GLOBAL"/>
<FeatureSiteTemplateAssociation Id="c9a041c2-f258-4290-bfa9-96c854a12b24" TemplateName="SPSNEWS#0"/>
where the ID is the Staplee feature ID, and the TemplateName is the [WebTemplate Name]#[Web Template ID].
But when trying to associate ALL site templates, you've got to drop the #[Web Template ID] to get it to work, like this:
<FeatureSiteTemplateAssociation Id="c9a041c2-f258-4290-bfa9-96c854a12b24" TemplateName="GLOBAL"/>
Subscribe to:
Posts (Atom)