in

Dot Net Mafia

Group site for developer blogs dealing with (usually) .NET, SharePoint 2013, SharePoint 2010, Office 365, SharePoint Online, and other Microsoft products, as well as some discussion of general programming related concepts.

This Blog

Syndication

Archives

Corey Roth [MVP]

A SharePoint MVP bringing you the latest time saving tips for SharePoint 2013, Office 365 / SharePoint Online and Visual Studio 2013.

Does Save Site as Template preserve Version History in sp2010?

It looks like the answer is no.  When you click the Include Content checkbox on the Save as Template page, it looks like only the latest version of documents and lists items are included in the .wsp file.  I ran a few tests and here is what I saw.  Consider the following document with its history from the source site.

SaveSiteSourceDocumentHistory

After I export the site, install and activate the solution on a new site collection and then use the Create Site menu to create a new instance of my site template, only the latest version of the document is there.  Now, I’m not complaining as this is already a great step in the right direction and it really does make moving things around between servers easier. In the screenshot below though, you can see that only the latest version is present.

SaveSiteDestinationDocumentHistory

I’m not really sure why it creates two versions of the document (with different file sizes even), but I am sure there is a reason.  If you haven’t use Save Site as Template, be sure and check it out.  It does export content (including documents). Your documents are packaged up in the .wsp and use the module element to copy them via feature to your document library.  Here is what your package looks like in Visual Studio 2010.

SaveSitePackage

As you can tell from my string of posts lately, I am really excited about the Save Site as Template functionality.  We all would have killed to have it in WSS3.  It really is a great way to see how things are built behind the scenes to using CAML.

Comments

 

Neel said:

Cory,

I am having similar issue in navigation, when I save site as template, for the navigation, i selected - Display the same navigation items as the parent site , when i create a test site using the same template, it resets the navigation to    Display the navigation items below the current site  .. any ideas how to work around

Thank you

Neel

April 12, 2011 11:00 AM
 

CoreyRoth said:

@Neel I haven't ran into that myself.  I assume that setting gets set in the property bag, but I would have to look further into it.

April 12, 2011 2:35 PM
 

Rex said:

Hi

I'm having the same problem as Neel! But it seems like this is standard SharePoint behaviour. Testing in another SP2010 environment ended in the same annoying result.

June 20, 2011 7:51 AM

Leave a Comment

(required)  
(optional)
(required)  
Add

About CoreyRoth

Corey Roth is an Applications Architect at Infusion specializing in ECM and Search.
2012 dotnetmafia.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems