In this blog I would like to explain some of the technical limitations we have encountered using SharePoint 2010 Solutions.
Background
In SharePoint 2003 and SharePoint 2007, when creating a copy of a site (also called a 'web' in SharePoint) you can save an existing site to the Site Template Gallery. The Site Template Gallery is a library of files stored at the root of a site collection. New sites can then be created from these site templates by selecting them in the Custom tab on the New SharePoint Site page. You could also save these Site Template Gallery items as files and then copy them between different site collections and servers. Over the life of SharePoint 2007 we experienced few issues with this approach and therefore assumed that when SharePoint 2010 shipped that we would be able to continue with that approach for moving sites between site collections and servers and use it when creating new instances of sites within a site collection.
SharePoint 2010 - Solution Gallery
In SharePoint 2010 Microsoft added the concept of Sandboxed Solutions, which are custom solutions that can be uploaded to a Site Collection without the need to install the solution onto the whole server farm. This has a number of advantages especially in the realm of security, and even though the jury is out on whether they are good or bad the fact is that they are here, and are here to stay. Allowing Sandboxed Solutions for its intended purpose is useful in my opinion, what makes it problematic however is that rather than retain a Site Template Gallery for site templates, these now also get saved as Solutions and get placed in the Solutions Gallery. So SharePoint 2010 has no dedicated Site Template Gallery. Since the SharePoint 2010 Solution Gallery is not the same animal as the Site Template Gallery what we started to gradually identify were more and more issues when using sites create from Solutions saved to the Solution Gallery.
Solutions - The Issues … as we see them!
So what are these issues? Well here is a list of what we regard as significant drawbacks to using the Solutions approach to creating sites:
- Solutions are saved with a dependence on the Features enabled at the time the Solution was saved. This makes moving Solutions between servers difficult as ALL the features on the source server must be activated on the target server when creating a New Site. It also makes it, for all practical purposes, impossible to move a site from a SharePoint Server 2010 environment to a SharePoint Foundation 2010 environment. So now moving sites around has got much more difficult.
- New sites created from the Solution Gallery are 'Sandboxed' sites and therefore certain features that work in the source site, such as workflow emailing, will not work in the new site.
- Solutions must remain in the Solutions Gallery after new sites are created using them in order for the new site features to all continue to work. This in turn means that as a site template evolves, and you improve its design and want to use the new design, you will have to retain the older versions in the Solution Gallery in order for existing sites features to remain working. If this happens, you can quickly end up with multiple versions of multiple site templates in your Solution Gallery, and it will quickly become difficult to manage all the similar Solutions.
-
Here are some issues we have identified with new sites created based on a Solution (while the Solution is still active):
- Attachments are missing from any pre-populated list items
- List View web parts that default to datasheet mode are no longer datasheets
- Calendar overlays are not preserved
- Calendar recurring event setting is not preserved
- Web Level Content Types can appear to be duplicated
- Items in lists with multiple content types can be associated with the wrong Content Types
- Picture Libraries, with a single image with a Date Picture Taken value set, will cause the New Site create process to fail
-
Issues with sites created based on a Solution once the Solution is deactivated include:
- Web level Content Types are removed completely
- SharePoint Designer Custom Actions are removed completely
- Custom form level events are disabled
Note that once a Solution is Deactivated, Activating it again will not repair the site.
- Also, when managing the Solution in the Solution Gallery we have found that you need to be a Site Collection Administrator to Deactivate a Solution even if you Activated it without that level of privilege.
Is there a solution to these Solution Issues?
Firstly, don't get your hopes up! As I mentioned, Microsoft are unlikely to do anything radical to change this approach in the short to medium term. We are working on an alternative for our BrightWork customers but this is not a trivial exercise and this option will not be available to most SharePoint users. The best approach then becomes damage limitation. Knowing which features are not supported and subsequently not including them in your design is a good first step, though leaving out some of these features can be difficult. Another approach is to use a Solution to create the basics of your site and then add in the unsupported features manually afterwards, albeit you will still be operating within a Sandboxed site.
Hopefully the content above will help raise awareness of these potential issues and aid you in your SharePoint 2010 site template design.