简体   繁体   English

Sharepoint ContentTypeBinding和查找字段出现问题

[英]Problem with Sharepoint ContentTypeBinding and Lookup field

I have a problem with ContentTypeBinding when creating a new site. 创建新站点时,ContentTypeBinding存在问题。 I have custom site template definition where I have referenced Publishing Server Feature, so list Pages is automatically created on site. 我在其中引用了Publishing Server Feature的情况下具有自定义网站模板定义,因此列表页面是在网站上自动创建的。 I need to bind custom content type to OOB Pages list. 我需要将自定义内容类型绑定到OOB页面列表。 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(). SPContentTypeBindingElement.ElementActivated()。 An error occurred binding content type '0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF390045BF70D1ABCA4A5BBF576B785EB3A37D' to list '/site/Pages' on web 'http://xxx/site'. 绑定内容类型'0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF390045BF70D1ABCA4A5BBF576B785EB3A37D'从而在网站'http:// xxx / site'上列出'/ site / Pages'时发生错误。 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=0000000001BFD 异常'0x80070057owssvr.dll:(未解决的符号,模块偏移量= 0000000000034256)位于0x000007FEE9954256 mscorwks.dll:(未解决的符号,模块偏移量= 00000000002BF6D7)位于0x000007FEF61FF6D7 Microsoft.SharePoint.Library.ni.dll:模块(未解决的符号,000000B )在0x000007FEEAD9AB02 Microsoft.SharePoint.ni.dll:(在0x000007FEEE8BB029 Microsoft.SharePoint.ni.dll:(未解析的符号,模块偏移= 0000000001BDCBB1)在0x000007FEEAD9AB02 Microsoft.SharePoint.ni.dll:未解析的符号,模块偏移量= 0000000001AB76AB)在0x000007FEEE8F76AB Microsoft.SharePoint.ni.dll:(未解析的符号,模块偏移量= 0000000001AB7D2A)在0x000007FEEE8F7D2A Microsoft.SharePoint.ni.dll:(未解析的符号,模块偏移量= 0000000001AB6E1F)在0x00000。 SharePoint.ni.dll :(未解析的符号,模块偏移量= 0000000001BFCB4F)位于0x000007FEEEA3CB4F Microsoft.SharePoint.ni.dll :(未解析的符号,模块偏移量= 0000000001BFD F52) 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 symbo F52)位于0x000007FEEEA3DF52 Microsoft.SharePoint.ni.dll:(未解析的符号,模块偏移= 00000000025D073E)位于0x000007FEEF41073E Microsoft.SharePoint.ni.dll:位于(0x000007FEEF41073E的Microsoft.SharePoint.ni.dll:(未解析的符号,模块偏移= 00000000025D0DEC)Microsoft.SharePoint.ni.dll: (未解析的符号,模块偏移= 0000000001F0BD0F)在0x000007FEEED4BD0F Microsoft.SharePoint.ni.dll :(未解析的符号,模块偏移= 0000000001F0D8A6)在0x000007FEEED4D8A6 Microsoft.SharePoint.ni.dll :(未解析的符号,模块偏移= 0000000001D2B7B8) .SharePoint.ni.dll:(未解析的符号,模块偏移= 0000000001AD36D4)在0x000007FEEE9136D4 Microsoft.SharePoint.ni.dll:(未解析的符号,模块偏移= 0000000001AD2F86)在0x000007FEEE912F86在Microsoft.SharePoint.ni.dll:(未解析的符号,模块在0x000007FEEEF14DCD处偏移量= 00000000020D4DCD)Microsoft.SharePoint.ni.dll:在0x000007FEEF0F8A80处Microsoft.SharePoint.ni.dll :(未解析的符号,模块偏移量= 00000000022B8A80):(未解析的符号 l, module offset=0000000001B006B6) at 0x000007FEEE9406B6 Microsoft.S'. l,模块偏移= 0000000001B006B6)位于Microsoft.S'的0x000007FEEE9406B6。

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. 因此,我的类别列表是在Web范围功能A中创建的,而此查找字段,内容类型+查找字段和内容类型绑定是在另一个功能B中。我将依赖关系从B添加到A。这两个功能都在onet.xml中引用。 Unfortunately I've got still the some problem. 不幸的是我仍然有一些问题。

I resolved this issue already. 我已经解决了这个问题。 If somebody else is interested in the solution, it is here: Problem with Sharepoint ContentTypeBinding and Lookup field 如果其他人对该解决方案感兴趣,请访问: Sharepoint ContentTypeBinding和Lookup字段出现问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM