Sharepoint 2010: Create site from site template where alternate CSS url is set – unexpected error occured accessing site settings
By peter.stilgoe
When you create a site template in Sharepoint 2010 where the template is taken from a site that has an alternate CSS url set, you find on the newly created site that when you try & access ‘Site Settings’ or ‘View all site content’ you get the ‘An unexpected error occured’.
In your logs you get something like:
System.Web.HttpException: Error executing child request for /sites/SiteName/Style Library/site-style.css
This appears to be a bug, you can fix the site by running the following Powershell script:
$w = Get-SPWeb http://YourServer/YourWeb; $w.AlternateHeader = $null; $w.Update()
Powershell , Sharepoint 2010 , Sharepoint Errors , Sharepoint Site Templates
Powershell, Sharepoint 2010, Sharepoint Errors, Sharepoint Site Templates
11 Comments
February 16th, 2011
About... peter.stilgoe
Sharepoint, InfoPath, K2, Nintex, Business Process Mapping, Business Intelligence, Automation, ECM, Document Management, Document Imaging, Internet Marketing & Online Business Consultant Email / MSN: pstilgoe@hotmail.com LinkedIn: Pete Stilgoe - Sharepoint Consultant
Share
11 Comments
Tag Cloud
C#
calculated column
Content Editor Webpart
content types
cqwp
dates
dvwp
InfoPath
infopath tips & tricks
Information Architechture
Javascript
JQuery
K2 Blackpearl
K2 Blackpoint
K2 Blackpoint Troubleshooting
K2 Troubleshooting
MS Office
NHS Sharepoint
one way trust
Open XML SDK 2
Powershell
search
search results
Sharepoint / MOSS / WSS
Sharepoint 2010
Sharepoint CSS
Sharepoint Customisation
Sharepoint DVWP
Sharepoint Errors
Sharepoint How To
Sharepoint Lists
Sharepoint Master Pages
Sharepoint Pages
Sharepoint Service Applications
Sharepoint Webparts
sql 2008
SQL Server
stsadm
Taxonomy
user profiles
Visual Studio 2010
Word Automation Services
xml
xsl
xslt
Recent Posts
- Sharepoint 2010: How to copy a Sharepoint page with all webparts included
- Sharepoint: How to create a url to force a document to download instead of open
- Stock trading: Always trade your plan
- Sharepoint 2010: Bulk edit Sharepoint list items using Powershell
- Sharepoint 2010 – Solution stuck on Retracting
Recent Comments
- Anna Paquin and Stephen Moyer got married | Ourbs.com on DVWP How to remove duplicate entries in filter dropdown list
- Antony on How to display HTML in the Dataview & Content Query Webpart (DVWP CQWP)
- Pablo on How to display ‘anything’ in Sharepoint 2010 pop up / modal window
- BillHenry on Creating an Org Chart using Visio 2007 and a SharePoint List
- Devik on How to remove personalize this page, My settings etc from WSS & MOSS 2007
Categories
- Access
- ACT
- ADFS
- ADO.net
- Affiliate Marketing
- Analytics & Tracking
- Autodesk Inventor / Vault
- AvePoint
- BDC
- Betting
- Blackberry / BES
- Business & Entrepreneurship
- Business Intelligence
- Business Physcology
- C#
- CAML
- CNC
- Codeplex
- Content Editor Webpart
- Content Query Webpart
- Document Imaging
- Document Management
- Domain Name Investing
- Email Marketing
- Enterprise Content Management
- Enterprise Search
- Extranet
- Firewalls
- Forefront Security
- Forex
- Forms Server
- IIS
- InfoPath
- Information Architechture
- Internet Marketing
- ITIL
- Javascript
- JQuery
- K2 Blackpearl
- K2 Blackpoint
- Kerberos
- KnowledgeLake
- Making Money
- Microsoft Dynamics CRM
- Micross / Omnis
- Misc
- MS Exchange
- MS Office
- MS UAG
- NHS Sharepoint
- Nintex
- Novell Netware
- Open XML SDK
- Oracle
- Pay Per Click
- PerformancePoint
- Perofrmance Tuning
- Ports
- Powerpivot
- Powershell
- Project Management
- RAM / Memory
- Records Management
- Relex Studio
- Sharepoint / MOSS / WSS
- Sharepoint 2010
- Sharepoint Access Services
- Sharepoint Alerts
- Sharepoint Backup Restore
- Sharepoint Business Connectivity Services
- Sharepoint Calculated Columns
- Sharepoint Columns
- Sharepoint Commercial Websites
- Sharepoint Content Type Hub
- Sharepoint Content Types
- Sharepoint CQWP
- Sharepoint CSS
- Sharepoint Customisation
- Sharepoint Databases
- Sharepoint Designer
- Sharepoint Document Sets
- Sharepoint DVWP
- Sharepoint Errors
- Sharepoint Excel Web Services
- Sharepoint Forms
- Sharepoint How To
- Sharepoint IA
- Sharepoint Layouts
- Sharepoint Lists
- Sharepoint Lookup Columns
- Sharepoint Master Pages
- Sharepoint Migration
- Sharepoint Project Planning
- Sharepoint Publishing Sites
- Sharepoint Redundancy
- Sharepoint Search
- Sharepoint Security
- Sharepoint Service Applications
- Sharepoint Site Templates
- Sharepoint Solution Files
- Sharepoint SSO
- Sharepoint SSP
- Sharepoint STSADM
- Sharepoint Styling
- Sharepoint Surveys
- Sharepoint Templates
- Sharepoint Timer Jobs
- Sharepoint Updates
- Sharepoint User Profiles
- Sharepoint Views
- Sharepoint Web Applications
- Sharepoint Webparts
- Sharepoint Webservices
- Sharepoint Workflows
- SMTP
- SQL Reporting Services
- SQL Server
- SQL Server 2008
- SQL SSIS
- SSAS
- SSO
- Stockmarket
- Symantec
- Taxonomy
- Trust Relationships
- Video Conferencing
- Virtualization
- Visual Studio 2010
- Windows / Active Directory
- Windows Server 2008
- Windows Trust Relationship
- Windows User Profiles
- Windows Vista
- Word Automation Services
- Workflow
- xml
- Xpath
- xsl
- XSLT
Archive
- May 2013 (1)
- February 2013 (2)
- November 2012 (1)
- October 2012 (1)
- August 2012 (1)
- July 2012 (1)
- May 2012 (1)
- April 2012 (4)
- March 2012 (7)
- February 2012 (3)
- January 2012 (6)
- November 2011 (2)
- October 2011 (1)
- September 2011 (1)
- August 2011 (1)
- July 2011 (5)
- June 2011 (3)
- May 2011 (12)
- April 2011 (13)
- March 2011 (15)
- February 2011 (15)
- January 2011 (10)
- December 2010 (8)
- November 2010 (7)
- October 2010 (7)
- September 2010 (4)
- August 2010 (4)
- July 2010 (16)
- June 2010 (4)
- May 2010 (4)
- April 2010 (4)
- March 2010 (11)
- February 2010 (4)
- January 2010 (8)
- December 2009 (2)
- November 2009 (6)
- October 2009 (7)
- September 2009 (11)
- August 2009 (14)
- July 2009 (4)
- June 2009 (2)
- April 2009 (1)
- March 2009 (5)
- February 2009 (2)
- January 2009 (4)
- December 2008 (5)
- November 2008 (14)
- October 2008 (17)
- September 2008 (10)
- August 2008 (14)
- July 2008 (10)
- June 2008 (4)
- May 2008 (2)
- April 2008 (12)
- March 2008 (19)
- February 2008 (5)
- January 2008 (7)
- December 2007 (2)
- November 2007 (14)
- October 2007 (7)
- September 2007 (1)
- August 2007 (4)
- July 2007 (18)
- June 2007 (14)
- May 2007 (13)
- April 2007 (4)
- March 2007 (3)
- February 2007 (3)
- January 2007 (2)
- December 2006 (2)
- November 2006 (2)
- October 2006 (13)
- September 2006 (7)
- August 2006 (7)
- July 2006 (4)
- June 2006 (1)
- May 2006 (5)
- April 2006 (3)
- March 2006 (6)
- February 2006 (2)
- January 2006 (3)
Sharepoint / MOSS / WSS
- Cloud Computing Integration
- Cloud Taxonomy
- Good examples of Jquery & HTML
- Information Architechture
- MOSS MVP – Good Tips
- Pingar – Taxonomy Builder
- Search Federation – Twitter Example
- Sharepoint 2010 BI
- SharePoint 2010 Branding & Design
- Sharepoint Boris
- Sharepoint Powershell Scripts
- TaxoCloud.com
- Workflow Management Coalition



i dont see any difference after executing this statement, the error is still there
[Reply]
It worked for our farm. I had 4 sites in this situation and worked for them all. Thank you!
[Reply]
Sweet! This does the job. Any idea if this issue is fixed by a cumulative patch from microsoft?
[Reply]
peter.stilgoe Reply:
June 29th, 2011 at 9:54 am
If its not in the very latest Sharepoint 2010 Cumulative update the no, I find it strange they havnt released a fix for it yet tbh
[Reply]
same problem here.
After executing you’re fix the problem went gone.
But every time we make a new site, the problem still exists and we must execute the fix again.
Hopefully Microsoft will release a permanent fix for this.
[Reply]
Thank you so much. I made a template and created about 50 sites from it. I thought I would have to go back and manually create each one. This script worked perfectly and fixed all of my sites.
You are a life saver! Add me as one more for wanting a permanent fix for this simple issue.
[Reply]
running the script did fix the issue on a site already created. I wasn’t able to use it to fix the site the template was created from, but, I was able to save the template file (.wsp) to my local machine, unpack it (with 7-zip), then do a search for the string “alternateCssUrl” in all the files – it will find it in a couple of files – remove the value specified (so it reads like AlternateCssUrl=”"
Then re-package the files (re-creating the WSP) by following these instructions (it’s not too difficult)
http://geekswithblogs.net/SoYouKnow/archive/2010/02/16/rebuilding-a-.wsp-file-in-4-easy-steps.aspx
and then upload that template to the solution gallery.
What a hassle!
[Reply]
Hi Peter. Thanks. It works for me.
[Reply]
[...] Pete wrote a PowerShell script to fix the problem afterwards: [...]
[...] http://world wide web.petestilgoe.com/2011/02/sharepoint-2010-create-site-from-site-template-where-a… [...]
worked for me,
thanks
SharePoint development is full of gotchas!
[Reply]