Introduction
A SharePoint 2007 site with configured lists, content types, web parts, data, etc is saved into a template (.STP) for future creation of sites. However you receive the error "Failure decompressing data from a cabinet file".
In one of our customer cases the culprit here were the document templates attached to Content Types on the site. You see, we had been creating Content Types and uploading document templates directly to them. This places the template in the (hidden) Content Type location and it is saved together with the rest of the data into the STP file.
Beside this issue this would also mean that for the hundreds of sites based on this STP we would have a lot of duplicate templates and any modification would have to be replicated manually or scripted to all the sites.
In our scenario it was thus better to have a central location for the document templates and just link them to the Content Type. The hundreds of sites would then just reference the central document template:
- makes the STP smaller in size (because the document template is not inside)
- increases manageability (just one document template to maintain)
Possible downsides:
- Cannot be used in every scenario (when you want to differentiate the template for specific sites)
- Cannot be packaged as single STP and exported to another server (the other server would need the central library with document templates)
Follow up
So we created a central library for the document templates and linked to them in the Content Type settings via the URL. However the old uploaded template remains in the (hidden) Content Type location and must be deleted !! If not the STP file size won't decrease and (in our case) the issue remains.
Howto:
- Open SharePoint Designer 2007 and navigate to the SharePoint site
- Expand the Content Type location (can be on Site Level, List Level or both depending on which one you attached the document template)
- Delete the unused document template