You may notice “Save Site As a Template” not appears in site settings page if you create your site as a publishing web site. This happened in SharePoint 2010 as well. Follow this tutorial you can make the “save site as a template” visible at all time. But for easy step, you can just append “/_layouts/savetmpl.aspx” to the url.


Another thing I found, if your source site has “AlternateCSSUrl”, when you saved the site as template and create a new site based on the template. You may receive the error like

07/19/2010 12:45:32.09  w3wp.exe (0x0A48)                        0x1754 SharePoint Foundation          Runtime                        tkau Unexpected System.Web.HttpException: Error executing child request for /Style Library/RMB.css.    at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride)     at System.Web.HttpServerUtility.Execute(String path, TextWriter writer, Boolean preserveForm)     at ASP._controltemplates_topnavbar_ascx.__Render__control1(HtmlTextWriter __w, Control parameterContainer)     at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection


This also seems to only apply to sites that have Publishing features enabled. There are 3 main problems here…

Firstly, in your site definition you have a property called AlternateCSSUrl which specifies your stylesheet e.g. /Style Library/Main.css. However, your site settings page doesn’t access the CSS at http://servername/Style Library/Main.css as you think it would, instead it looks for the css at http://servername/_layouts/1033/Style Library/Main.css. So basically you can go create a folder called Style Library in the 1033 folder, copy the css in there and then change your onet.xml to have AlternateCSSUrl="Style Library/Main.css" and it should take the error away.

Secondly, if you do this you would notice that now the physical contents of you CSS file is being written to the actualy page above all your site settings. I have no idea why this happens, but when you open that CSS file and remove all the contents the site settings page now works correctly.

Thirdly, because the actual contents of the css are written to the page they are obviously not being applied and you have to go into your site settings and set the CSS of your site to point to your actual style sheet.

I am still trying to figure out how to set the actual style sheet of the site in the definition but for now this is all I could find.

My workaround is go back to the source site and turn off the “AlternateCSSUrl ” and save the site as template again.