在共享点功能中导入 2 个自定义列表,第二个列表采用与第一个列表相同的自定义字段
我有一个使用 WSPBuilder 构建的 MOSS 2007 wsp 解决方案,其中包含 2 个自定义列表的定义。在我的 elements.xml 文件中,每个列表都有一个 和 一个节点。但是,当我激活该功能时,两个自定义列表都具有第二个列表中列出的自定义列。当我注释掉其中一个列表的 和 xml 节点时,另一个列表可以完美导入。此外,当我反转 xml 节点的顺序时,列表将包含其他自定义列表中的列。它们都始终从 elements.xml 中的第一个列表中获取字段。
我假设我有一些唯一的 id 或在某处重复的内容,因此第二个列表以某种方式从错误的模式文件或其他内容中读取,我真的不确定。我没有在 elements.xml 文件中指定任何 id,所以我假设 schema.xml 文件中会发生重复?
有谁知道我可以从哪里开始寻找? schema.xml 文件中有很多 guid,我真的不知道从哪里开始。
elements.xml供参考:
<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<ListTemplate
Name="Favorites"
DisplayName="Favorites"
Description=""
BaseType="0"
Type="100"
OnQuickLaunch="TRUE"
SecurityBits="11"
Image="/_layouts/images/itgen.gif" />
<ListInstance
Title="Favorites"
Url="Favorites"
Description="Favorites"
OnQuickLaunch="true"
TemplateType="100" />
<ListTemplate
Name="Folders"
DisplayName="Folders"
Description=""
BaseType="0"
Type="100"
OnQuickLaunch="TRUE"
SecurityBits="11"
Image="/_layouts/images/itgen.gif" />
<ListInstance
DocumentTemplate=""
Title="Folders"
Url="Folders"
Description="Folders"
OnQuickLaunch="true"
TemplateType="100" />
</Elements>
I have a MOSS 2007 wsp solution that I am building with WSPBuilder, that contains definitions for 2 custom lists. In my elements.xml file, I have a and a node for each list. However, when I activate the feature, both custom lists have the custom columns listed in the 2nd list. When I comment out the and xml nodes for one of the lists, the other one imports perfectly. Additionally, when I reverse the order of the xml nodes, the lists then have the columns from the other custom list. They both are always taking the fields from the first list in the elements.xml.
I'm assuming I have some unique id or something duplicated somewhere, and so the 2nd list is somehow reading from the wrong schema file or something, I'm really not sure. I'm not specifying any id's in the elements.xml file, so I'm assuming the duplication would be occurring in the schema.xml files?
Does anyone have any idea where I could even begin to look? There are so many guids in the schema.xml files, I'm really not sure where to even start.
elements.xml for reference:
<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<ListTemplate
Name="Favorites"
DisplayName="Favorites"
Description=""
BaseType="0"
Type="100"
OnQuickLaunch="TRUE"
SecurityBits="11"
Image="/_layouts/images/itgen.gif" />
<ListInstance
Title="Favorites"
Url="Favorites"
Description="Favorites"
OnQuickLaunch="true"
TemplateType="100" />
<ListTemplate
Name="Folders"
DisplayName="Folders"
Description=""
BaseType="0"
Type="100"
OnQuickLaunch="TRUE"
SecurityBits="11"
Image="/_layouts/images/itgen.gif" />
<ListInstance
DocumentTemplate=""
Title="Folders"
Url="Folders"
Description="Folders"
OnQuickLaunch="true"
TemplateType="100" />
</Elements>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您可能希望对收藏夹和文件夹列表使用不同的“类型”编号,这也可能会导致您将所有 FieldRef 从一个列表分配到另一个列表。
I think you might want to use different "Type" numbers for your Favourites and Folders lists, this might also see you having all FieldRefs being assigned from one list into the other.