Importing 2 custom lists in a sharepoint feature, 2nd list taking on the same custom fields as the first

386 views Asked by At

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

There are 1 answers

1
James Love On BEST ANSWER

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.