1

I have a problem with ContentTypeBinding when creating a new site. I have custom site template definition where I have referenced Publishing Server Feature, so list Pages is automatically created on site. I need to bind custom content type to OOB Pages list. Do anybody know how to do that? My custom content type is deployed by feature on site collection scope.

Now I trying to do it in this way, but it's not working. In site template I referencing feature, which contains element with content type binding:

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <ContentTypeBinding ContentTypeId="GUIDOFCONTENTTYPE" ListUrl="Pages" />
</Elements>

I'm getting this error when I try to create new site:

SPContentTypeBindingElement.ElementActivated(). An error occurred binding content type '0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF390045BF70D1ABCA4A5BBF576B785EB3A37D' to list '/site/Pages' on web 'http://xxx/site'. Exception '0x80070057owssvr.dll: (unresolved symbol, module offset=0000000000034256) at 0x000007FEE9954256 mscorwks.dll: (unresolved symbol, module offset=00000000002BF6D7) at 0x000007FEF61FF6D7 Microsoft.SharePoint.Library.ni.dll: (unresolved symbol, module offset=00000000000DAB02) at 0x000007FEEAD9AB02 Microsoft.SharePoint.ni.dll: (unresolved symbol, module offset=0000000001A7B029) at 0x000007FEEE8BB029 Microsoft.SharePoint.ni.dll: (unresolved symbol, module offset=0000000001BDCBB1) at 0x000007FEEEA1CBB1 Microsoft.SharePoint.ni.dll: (unresolved symbol, module offset=0000000001AB76AB) at 0x000007FEEE8F76AB Microsoft.SharePoint.ni.dll: (unresolved symbol, module offset=0000000001AB7D2A) at 0x000007FEEE8F7D2A Microsoft.SharePoint.ni.dll: (unresolved symbol, module offset=0000000001AB6E1F) at 0x000007FEEE8F6E1F Microsoft.SharePoint.ni.dll: (unresolved symbol, module offset=0000000001BFCB4F) at 0x000007FEEEA3CB4F Microsoft.SharePoint.ni.dll: (unresolved symbol, module offset=0000000001BFDF52) at 0x000007FEEEA3DF52 Microsoft.SharePoint.ni.dll: (unresolved symbol, module offset=00000000025D073E) at 0x000007FEEF41073E Microsoft.SharePoint.ni.dll: (unresolved symbol, module offset=00000000025D0DEC) at 0x000007FEEF410DEC Microsoft.SharePoint.ni.dll: (unresolved symbol, module offset=0000000001F0BD0F) at 0x000007FEEED4BD0F Microsoft.SharePoint.ni.dll: (unresolved symbol, module offset=0000000001F0D8A6) at 0x000007FEEED4D8A6 Microsoft.SharePoint.ni.dll: (unresolved symbol, module offset=0000000001D2B8EE) at 0x000007FEEEB6B8EE Microsoft.SharePoint.ni.dll: (unresolved symbol, module offset=0000000001AD36D4) at 0x000007FEEE9136D4 Microsoft.SharePoint.ni.dll: (unresolved symbol, module offset=0000000001AD2F86) at 0x000007FEEE912F86 Microsoft.SharePoint.ni.dll: (unresolved symbol, module offset=00000000020D4DCD) at 0x000007FEEEF14DCD Microsoft.SharePoint.ni.dll: (unresolved symbol, module offset=00000000022B8A80) at 0x000007FEEF0F8A80 Microsoft.SharePoint.ni.dll: (unresolved symbol, module offset=0000000001B006B6) at 0x000007FEEE9406B6 Microsoft.S'.

Have anybody some experience with that?

UPDATE:

I finded what causes my problem. It's lookup field in my content type. When I put this lookup out it works OK. But I still don't know how to resolve it.

Definition of my lookup:

<Field ID="{2FF1B484-6D70-449c-8E5C-904E4D5971E1}"
     Name="PageCategory"
     Group="Intranet Columns"
     Type="Lookup"
     DisplayName="PageCategory"
     List="Lists/Categories"
     ShowField="Title"
     PrependId="TRUE"/>

I know, that before this field is created list Categories must exists. So my Categories list is created in web-scope feature A and this lookup field, content type + lookup field and content type binding is in another feature B. I added dependency from B to A. Both features are referenced in onet.xml. Unfortunately I've got still the some problem.

1 Answer 1

1

I resolved this issue already. If somebody else is interested in the solution, it is here: Problem with Sharepoint ContentTypeBinding and Lookup field

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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