CSS contents showing in settings page for site based on custom template

0 comments

At a customer we created a few custom site templates by configuring them and then saving them as template. When creating new sites based on this template, we had the strange issue that the contents of the Alternate CSS (AlternateCSSUrl) were included and showing in the header on layouts pages in the sites.
It appears that the AlternateCSSUrl is also set on the AlternateHeader property of the SPWeb object.

This post on the SharePoint 2010 forums also mentions this issue.

You can off course use powershell to get rid of this problem:

$site = Get-SPSite "http://sitecollectionurl"

$web = $site.OpenWeb("/weburl")

$web.AlternateHeader = ""

$web.Update()

Update:
The post on the forums got answered and according to that it has to do with the publishing feature that was activated before saving the site as a template. However in my case that feature wasn’t activated, because we’re aware that such a scenario isn’t officially supported by Microsoft.

Related posts:

  1. Term Store management option missing in Site Collection settings
  2. JavaScript errors after implementing a custom site design
  3. Enhancements to Office client integration with Forms Based Authentication on SharePoint
  4. DateTimeField vs. FieldValue in a publishing page
  5. InfoPath Form Template stays in “installing” state
Tagged . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>