Why is my custom ContentType getting an activation error?

I am creating a custom ContentType for SharePoint 2007 as a site collection bound feature. When I try to activate the function, I get an error page with only this key: "The value is not in the expected range"

Here are my feature.xml XML files:

<?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>

      

and 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>

      

Thanks,
Kate

+1


a source to share


1 answer


I understood that.

This line, <ContentType ID="0X010100YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY"

Should be <ContentType ID="0X010100YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY"



The "X" in the ID must be lowercase.

Whale

+2


a source







All Articles