Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I had created custom content types in site settings that I was referencing with a list on a site. When I did a save as template from the site, would that have also saved the content types?

I passed this code to QA and they were unable to create a new site using the template. They received a general error, which was untraceable in the logs using the guid.

I then did a remove-spsite, followed by a new-spsite (without specifying the template) and then imported the template into the soultion explorer and attempted to assign to the site using the gui. I also recevied the same generic error. In the ULS Logs I keep seeing the following error message: The element of type 'ListInstance' for feature 'template_projectlistListInstances' (id: 1a54f690-78aa-47f1-beee-b517a80bc18b) threw an exception during activation: The formula contains a syntax error or is not supported.

If the template would not have included the content types (and they are now lost), is there any way to pull them from my content database manually?

Anyone have any insight into my pain?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Unfortunately exporting web templates from a site is not always without problems. There are numerous issues where support is limited or it is simply not working. Exporting publishing sites for example does not work, and is not supported, custom fields also has issues, so it is probably a qurk somewhere in your list instance and its content type and fields that you are experiencing. Without more info it would be hard to pinpoint what exactly goes wrong.

To answer your question, yes content types and fields are exported along with list instances, and you should be able to salvage them from our failed export wsp.

The way I usually go about extracting content types and fields, is to export the web template as wsp, and then import them into a new temporary Visual Studio 2010 import project. Here you can simply copy the manifest and element files with SPI's and all into another existing VS solution, add artifacts to a site scoped feature and you have your content types ready to be deployed through a solution and feature.

Check out this channel9 video on how to do what i decribed.

share|improve this answer
    
Thanks a mill, Anders. I imported the wsp file into VS using the WSP Import project. I then did a find in solution for all "formula" words. I found a data column that had a spaces in the column name. Once I removed this column, I was able to deploy without errors. I was also able to have QA install the new wsp from powershell and his works too. This is a bit scary going forward. I have other columns with spaces as well, but it's now working. –  JR_ATLDev May 24 '11 at 13:56
    
I suppose I need to read up on best practices for creating site templates that can be duplicated as that is our companys preferred method of deployment. Many thanks, sir! –  JR_ATLDev May 24 '11 at 13:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.