无法使用从我的内容类型中删除系统页面字段;

发布于 2024-08-23 16:56:21 字数 1233 浏览 6 评论 0原文

我正在使用 VS2010 在 SP2010 RC 中的发布网站的功能中创建一些内容类型,但无法使用 RemoveFieldRef 删除页面内容类型中包含的开箱即用的联系人字段。我的定义如下:

  <ContentType ID="0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900a10c9f46e3b0489a96c510a54038a558"
               Name="CustomPage"
               Group="MyGroup"
               Description="My content type"
               Inherits="TRUE"
               Version="0">
    <FieldRefs>
      <RemoveFieldRef ID="{aea1a4dd-0f19-417d-8721-95a1d28762ab}" Name="PublishingContact"/>
      <RemoveFieldRef ID="{c79dba91-e60b-400e-973d-c6d06f192720}" Name="PublishingContactEmail"/>
      <RemoveFieldRef ID="{7546ad0d-6c33-4501-b470-fb3003ca14ba}" Name="PublishingContactName"/>
      <RemoveFieldRef ID="{dc47d55f-9bf9-494a-8d5b-e619214dd19a}" Name="PublishingContactPicture"/>
      <FieldRef ID="{BEAC7028-777F-4f1d-ACE0-A61A4302A0D6}" Name="Description"/>
      <FieldRef ID="{A2CBC8CE-04D5-4403-A929-F1E0779A9CF2}" Name="UsefulLinks"/>
      <FieldRef ID="{9dd17ea7-6dda-46f4-91ec-0beaa81e508b}" Name="Contacts"/>
    </FieldRefs>
  </ContentType>

任何人都可以解释为什么当我在“站点设置”->“激活”功能后查看内容类型时,这些字段仍然出现吗?内容类型?

I'm creating some content types in a feature for a publishing site in SP2010 RC using VS2010, and I am unable to remove the out-of-the-box Contact fields included in the Page content type with RemoveFieldRef. My definition looks like:

  <ContentType ID="0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900a10c9f46e3b0489a96c510a54038a558"
               Name="CustomPage"
               Group="MyGroup"
               Description="My content type"
               Inherits="TRUE"
               Version="0">
    <FieldRefs>
      <RemoveFieldRef ID="{aea1a4dd-0f19-417d-8721-95a1d28762ab}" Name="PublishingContact"/>
      <RemoveFieldRef ID="{c79dba91-e60b-400e-973d-c6d06f192720}" Name="PublishingContactEmail"/>
      <RemoveFieldRef ID="{7546ad0d-6c33-4501-b470-fb3003ca14ba}" Name="PublishingContactName"/>
      <RemoveFieldRef ID="{dc47d55f-9bf9-494a-8d5b-e619214dd19a}" Name="PublishingContactPicture"/>
      <FieldRef ID="{BEAC7028-777F-4f1d-ACE0-A61A4302A0D6}" Name="Description"/>
      <FieldRef ID="{A2CBC8CE-04D5-4403-A929-F1E0779A9CF2}" Name="UsefulLinks"/>
      <FieldRef ID="{9dd17ea7-6dda-46f4-91ec-0beaa81e508b}" Name="Contacts"/>
    </FieldRefs>
  </ContentType>

Can anyone shed some light on why the fields still appear when I go to have a look at the content type after feature activation in Site Settings -> Content Types?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

债姬 2024-08-30 16:56:21

删除 Inherits="TRUE" 并重试,也对我有用,我在我的案例中发现的原因是我从(发布)页面继承内容类型并尝试在团队站点上部署该功能。我指定的父内容类型是错误的。

Remove Inherits="TRUE" and try again, Works for me as well, the reason what I found in my case is that I inherit content type from (publishing)Page and try to deploy the feature on teamsite. The parent content type I specified was wrong.

萌化 2024-08-30 16:56:21

删除 Inherits="TRUE" 并重试。

由于您将问题标记为 sharepoint2010,我尝试在我的 SharePoint 2010 开发环境中复制该错误。在删除 Inherits 行之前,Visual Studio 2010 不允许我构建和部署。删除后,解决方案的构建和部署就没有问题。然后我转到“站点设置”>“站点设置”网站内容类型>自定义页面。内容类型中唯一的列如下:名称、标题、评论、计划开始日期、计划结束日期、汇总图像和目标受众。

Remove Inherits="TRUE" and try again.

Since you tagged the question as sharepoint2010, I tried to replicate the error in my SharePoint 2010 development environment. Visual Studio 2010 would not let me build and deploy until I removed the Inherits line. Once it was removed, the solution built and deployed without problem. I then went to Site Settings > Site Content Types > CustomPage. The only columns in the Content Type were as follows: Name, Title, Comments, Scheduling Start Date, Scheduling End Date, Rollup Image, and Target Audiences.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文