tags:

views:

574

answers:

2

I'm creating a SharePoint feature which will be used to deploy some content types (and their custom columns/ fields) into a a new SharePoint site.

I've used an external tool to generate the CAML for the content types (Andrew Connell's custom STSADM commands) but when I put them into the feature and run it I hit a problem.

The feature activates like I expect, but when I try and view the Site Content Types (/_settings/mngctypes.aspx) the CPU shoots up to 100% usage (w3wp) and stays there.

Has anyone seen this and know how to resolve it?

A: 

By custom columns do you meant custom fields? Which Content Type page are you trying to view? The list of all site content types, or the details page for your content type? If its the latter, could it your custom columns be causing the error?

Jason
some call them columns, others call them fields :P. And yes, the problem is when viewing the content type page. Added some clarifications
Slace
+6  A: 

I've seen this before, the XML generated does not contain the XML Namespace: Also note that this tool doesn't create XML that is 100% correct for use in a Feature.

Bad-XML:

<XmlDocument>
<FormTemplates xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms"&gt;
<Display>ListForm</Display>
<Edit>ListForm</Edit>
<New>ListForm</New>
</FormTemplates>
</XmlDocument>

Good-XML:

<XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms"&gt;
<FormTemplates xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms"&gt;
<Display>ListForm</Display>
<Edit>ListForm</Edit>
<New>ListForm</New>
</FormTemplates>
</XmlDocument>
Daniel Pollard
Finally got back to looking at this problem and you've hit the nail on the head! Thanks, life saver!
Slace
This saved me as well. Thanks so much!
Jeffaxe