2009-05-05 15 views
1

我創建一個自定義的ContentType爲SharePoint 2007的功能範圍的網站集。當我嘗試激活該功能,我得到一個錯誤頁面,只有這條線索:「值沒有在預期範圍內」爲什麼我的自定義ContentType功能在激活時出錯?

這裏是我的XML文件 feature.xml的:

<?xml version="1.0" encoding="utf-8"?> 
<!--Created by STSDEV at 5/5/2009 5:11:40 PM--> 
<Feature 
    Id="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" 
    Title="Custom Document Content Type" 
    Description="Custom Document Content Type" 
    Version="1.0.0.0" 
    Scope="Site" 
    Hidden="false" 
    ImageUrl="CustomDocumentContentType\Image.gif" 
    xmlns="http://schemas.microsoft.com/sharepoint/"> 
    <ElementManifests> 
    <ElementManifest 
     Location="CustomDocumentContentType.xml" /> 
    </ElementManifests> 
</Feature> 

和CustomDocumentContentType.xml:

<!--<?xml version="1.0" encoding="utf-8"?>--> 
<!--Created by STSDEV at 5/5/2009 5:11:40 PM--> 
<Elements xmlns="http://schemas.microsoft.com/sharepoint/"> 
    <ContentType ID="0X010100YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY" 
       Name="Custom Document Content Type" 
       Group ="Custom Document Content Types" 
       Description="Custom Document Content Type inherits from Document" 
       Version="0"> 
    <FieldRefs> 
    </FieldRefs> 
    </ContentType>    
</Elements> 

謝謝
基思

回答

2

我想通了這一個出。

這條線,<ContentType ID="0X010100YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY"

應該是<ContentType ID="0x010100YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY"

的 「X」 中的ID應該是小寫。

Keith

+1

不錯的工作除草一出!那些問題的種類促使我把我的頭髮留下。 +1爲您的努力發佈您自己的解決方案。 – 2009-05-06 17:57:06

相關問題