Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.
  1. I added a module
  2. The module is in the web feature
  3. Now when I provision a site it tells me "The specified list does not exist". I am creating the list in the onet.xml
  4. Now what to do?

This is from onet.xml

<List FeatureId="00bfea71-e717-4e80-aa17-d0c71b360101" Type="101" Title="Customer Invoices" Url="CustomerInvoices" />

This is from the module element.xml

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <Module Name="CustomerInvoices" Url="CustomerInvoices" RootWebOnly="FALSE" Path="Files\CustomerInvoices" xmlns="http://schemas.microsoft.com/sharepoint/">
        <File Url="Invoice and Payment Plan.xls" Type="GhostableInLibrary" Path="InvoiceandPaymentPlan.xls">
            <Property Name="ContentTypeId" Value="0x01010054A4D3DC99CB98468C7A59EBAC8B6376" />
            <Property Name="FileLeafRef" Value="Invoice and Payment Plan.xls" />
            <Property Name="ID" Value="1" />
            <Property Name="ContentType" Value="Document" />
            <Property Name="_ModerationStatus" Value="0" />         
            <Property Name="FSObjType" Value="0" />
            <Property Name="MetaInfo" Value="1;#Subject:SW|&#xD;&#xA;SPSDescription:SW|&#xD;&#xA;vti_parserversion:SR|12.0.0.6421&#xD;&#xA;vti_assignedto:SR|&#xD;&#xA;Keywords:SW|&#xD;&#xA;Owner:SW|&#xD;&#xA;vti_cachedcustomprops:VX|vti_approvallevel vti_categories Subject SPSDescription vti_assignedto Keywords Owner vti_title _Author _Category ContentType _Comments Status&#xD;&#xA;vti_modifiedby:SR|NOV\\fainte&#xD;&#xA;ContentTypeId:SW|0x01010054A4D3DC99CB98468C7A59EBAC8B6376&#xD;&#xA;ContentType:SW|Document&#xD;&#xA;vti_cachedtitle:SR|&#xD;&#xA;vti_title:SR|&#xD;&#xA;_Author:SW|NOV&#xD;&#xA;_Category:SW|&#xD;&#xA;_Comments:SW|&#xD;&#xA;Status:SW|&#xD;&#xA;vti_author:SR|NOV\\fainte&#xD;&#xA;vti_approvallevel:SR|&#xD;&#xA;vti_categories:VW|&#xD;&#xA;" />
            <Property Name="Order" Value="100.000000000000" />
        </File>
    </Module>
</Elements>
share|improve this question
    
Do I need to put a reference in the onet.xml file if I want to provision a file? –  Robert G May 31 '11 at 19:34
add comment

2 Answers

Sounds like classic race conditions. Never use modules or list instances inside onet.xml as they are prone to race conditions.

Do you activate the module using feature stapling? If so, you have no guarantee that the list is provisioned when your features are activated.

Solutions could be either to move list instance out of onet.xml into a feature with an activation dependency to module, or to activate module in webprovisioned event (SP2010 only).

I always keep onet.xml as slim as possible, first thing to go is modules and list instances!

share|improve this answer
add comment

Make sure the "Url" attribute of your List Instance node in ONET.xml matches that of the one in your Module element.

share|improve this answer
    
Yes sir, they are identical. I updated my post to include source code from both onet.xml and module's element.xml –  Robert G May 31 '11 at 19:53
    
Does your list actually provision? Once you get the error message, navigate to your/site/_layouts/viewlsts.aspx to see –  James Love May 31 '11 at 20:02
    
I guess not. I am trying to find out which order a site template provisioned. You know what I am going to add files using object model. Thanks 4 ur help. –  Robert G May 31 '11 at 20:04
    
No worries. You could also just create the list using a ListInstance element alongside your Module element (not inside of, outside). –  James Love May 31 '11 at 20:08
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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