High CPU usage when deploying content types via a SharePoint feature

梦想的初衷 提交于 2019-12-23 13:39:23

问题


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?


回答1:


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">
<Display>ListForm</Display>
<Edit>ListForm</Edit>
<New>ListForm</New>
</FormTemplates>
</XmlDocument>

Good-XML:

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



回答2:


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?



来源:https://stackoverflow.com/questions/539328/high-cpu-usage-when-deploying-content-types-via-a-sharepoint-feature

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!