In a recent project, we routinely modify a site, save the site as template and use the solution created to create new sites programmatically. This has been working well for the client for last six months and we haven’t encountered any issues. Occasionally, however, we encountered a problem which prevented us from deactivating or activating the solution in the solutions gallery. To overcome this, we deleted solutions from End User Recycle Bin and Deleted End User Recycle Bin views.

But this time around, every time I created the solution and created a site using this new solution and template, my new site looked bizarre! For instance, one of the libraries didn’t have the All Documents view and defaulted to My Documents view. But if you modified the URL for the library (from MyItems.aspx to AllItems.aspx), it would display the documents. Another difference was that the text from all content editor web parts on list pages were missing. The issue is displayed in pictures below using a test site.

Original site with content editor web part (highlighted by red box)
Site created from template with case-sensitive URL is missing the content editor web part

The site, which was saved as template (named TemplateSite with url TemplateSite) had all of the above: content editor web part content and the All Items view. It looked like the newly-created site took a very old version of the template solution, which didn’t exist anywhere in site collection — including the Recycle Bin. I tried the following steps several times:

1. Deactivate/delete the solution from solution gallery
2. Remove solution from Recycle Bin
3. Go to https://sitecollectionurl/templateSite/_layouts/savetmpl.aspx
4. Enter name of solution and check the “include content” checkbox in template
5. Hit ok
6. New solution gets created
7. Ensure it is activated
8. Now create a new site using the newly-created template

Consistently, the new site was missing some of the content from the original TemplateSite.

On one of these tries, I noticed I was typing “templateSite” with a lowercase t and not an uppercase T.

After I fixed the case in the URL and saved the site again as a template solution, I created a new site based on this solution and woot! This time it worked!

What does this tell you? Yes, SharePoint is case sensitive when you try to save a site as template, and therefore you need to be very careful when typing URLs on your own.

  • Here’s another example of case-sensitive SharePoint URLs.
  • I did compare the contents of https://sitecollectionurl/templateSite contents to https://sitecollectionurl/TemplateSite and they were the same: libraries were last modified on same date, View All Site Content displayed the same content and clicking on any library or list would take you to https://sitecollectionurl/TemplateSite. They were the same site.

Read more about the broad range of technical services AIS provides on our web site.