Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have created a custom web template and it will be deployed by feateure1 for example. Then I have also a module with inside of it the default page declaration. This module will be deployed by feature2. Feature2 will be activated by feature1 inside the webfeatures element in the onet.xml. I have also add some lists and libraries like tasks, announcement, event, shared documents and links.

Now I would like to add these lists into some webpart zone. I do as follow:

  <View List="Documents" BaseViewID="0" WebPartZoneID="Right" />

  <View BaseViewID="1" Type="HTML" OrderedView="TRUE" WebPartZoneID="Right" DisplayName="Links" DefaultView="TRUE"  List="Lists/Links"   />

</File>

When I deploy it and create a new subsite and select my custom web template it gives me the error below:

cannot complete this action

When I remove the links list and deploy it only with the document library, then it works.

Why it is not working? Is it because the documents is from type library and links is from type list?

<Module Name="ContentPageProvisioning" Url="$Resources:cmscore,List_Pages_UrlName;">
    <File Url="default.aspx" Type="GhostableInLibrary" Path="ContentPageProvisioning\default.aspx" IgnoreIfAlreadyExists="TRUE" >
      <Property Name="Title" Value="Home" />
      <Property Name="IncludeInGlobalNavigation" Value="FALSE" />
      <Property Name="ContentType" Value="Welcome Page" />
      <Property Name="PublishingPageLayout" Value="~SiteCollection/_catalogs/masterpage/BlankWebPartPage.aspx, Blank Web Part page" />

      <View List="$Resources:core,lists_Folder;/$Resources:core,links_Folder;" BaseViewID="0" WebPartZoneID="Right" WebPartOrder="1" />

    </File>
  </Module>
</Elements>

    <DocumentTemplate Path="STS" Name="" DisplayName="$Resources:core,doctemp_None;" Type="100" Default="FALSE" Description="$Resources:core,doctemp_None_Desc;" />

    <DocumentTemplate Path="STS" DisplayName="$Resources:core,doctemp_Word97;" Type="101" Description="$Resources:core,doctemp_Word97_Desc;">
        <DocumentTemplateFiles>
            <DocumentTemplateFile Name="doctemp\word\wdtmpl.doc" TargetName="Forms/template.doc" Default="TRUE"/>
        </DocumentTemplateFiles>
    </DocumentTemplate>
    <DocumentTemplate Path="STS" DisplayName="$Resources:core,doctemp_Excel97;" Type="103" Description="$Resources:core,doctemp_Excel97_Desc;">
        <DocumentTemplateFiles>
            <DocumentTemplateFile Name="doctemp\xl\xltmpl.xls" TargetName="Forms/template.xls" Default="TRUE"/>
        </DocumentTemplateFiles>
    </DocumentTemplate>
    <DocumentTemplate Path="STS" DisplayName="$Resources:core,doctemp_Powerpoint97;" Type="104" Description="$Resources:core,doctemp_Powerpoint97_Desc;">
        <DocumentTemplateFiles>
            <DocumentTemplateFile Name="doctemp\ppt\pptmpl.pot" TargetName="Forms/template.pot" Default="TRUE"/>
        </DocumentTemplateFiles>
    </DocumentTemplate>
    <DocumentTemplate Path="STS" DisplayName="$Resources:core,doctemp_Word;" Type="121" Default="TRUE" Description="$Resources:core,doctemp_Word_Desc;">
        <DocumentTemplateFiles>
            <DocumentTemplateFile Name="doctemp\word\wdtmpl.dotx" TargetName="Forms/template.dotx" Default="TRUE"/>
        </DocumentTemplateFiles>
    </DocumentTemplate>
    <DocumentTemplate Path="STS" DisplayName="$Resources:core,doctemp_Excel;" Type="122" Description="$Resources:core,doctemp_Excel_Desc;">
        <DocumentTemplateFiles>
            <DocumentTemplateFile Name="doctemp\xl\xltmpl.xlsx" TargetName="Forms/template.xlsx" Default="TRUE"/>
        </DocumentTemplateFiles>
    </DocumentTemplate>
    <DocumentTemplate Path="STS" DisplayName="$Resources:core,doctemp_Powerpoint;" Type="123" Description="$Resources:core,doctemp_Powerpoint_Desc;">
        <DocumentTemplateFiles>
            <DocumentTemplateFile Name="doctemp\ppt\pptmpl.pptx" TargetName="Forms/template.pptx" Default="TRUE"/>
        </DocumentTemplateFiles>
    </DocumentTemplate>
    <DocumentTemplate Path="STS" DisplayName="$Resources:core,doctemp_OneNote;" Type="111" Description="$Resources:core,doctemp_OneNote_Desc;">
        <DocumentTemplateFiles>
            <DocumentTemplateFile Name="doctemp\onenote\template.onepkg" TargetName="Forms/template.onepkg" Default="TRUE"/>
        </DocumentTemplateFiles>
    </DocumentTemplate>
    <DocumentTemplate Path="STS" DisplayName="$Resources:core,doctemp_FP;" Type="102" Description="$Resources:core,doctemp_FP_Desc;">
        <DocumentTemplateFiles>
            <DocumentTemplateFile Name="doctemp\fp\fptmpl.htm" TargetName="Forms/template.htm" Default="TRUE"/>
        </DocumentTemplateFiles>
    </DocumentTemplate>
    <DocumentTemplate Path="STS" DisplayName="$Resources:core,doctemp_BasicPage;" Type="105" Description="$Resources:core,doctemp_BasicPage_Desc;">
        <DocumentTemplateFiles>
            <DocumentTemplateFile Name="doctemp\blankpgs\_basicpage.htm" TargetName="Forms/_basicpage.htm" Default="TRUE"/>
        </DocumentTemplateFiles>
    </DocumentTemplate>

    <DocumentTemplate Path="STS" DisplayName="$Resources:core,doctemp_WebPartPage;" Type="106" Description="$Resources:core,doctemp_WebPartPage_Desc;">
        <DocumentTemplateFiles>
            <DocumentTemplateFile Name="doctemp\smartpgs\_webpartpage.htm" TargetName="Forms/_webpartpage.htm" Default="TRUE"/>
        </DocumentTemplateFiles>
    </DocumentTemplate>

    <DocumentTemplate XMLForm="TRUE" Path="STS" DisplayName="$Resources:core,doctemp_BlankForm;" Type="1000" Default="TRUE" Description="$Resources:core,doctemp_BlankForm_Desc;">
        <DocumentTemplateFiles>
            <DocumentTemplateFile Name="doctemp\xmlforms\blank\template.xml" TargetName="Forms/template.xml" Default="TRUE" />
        </DocumentTemplateFiles>
    </DocumentTemplate>             

</DocumentTemplates>
<BaseTypes>
</BaseTypes>
<Configurations>
    <Configuration ID="-1" Name="NewWeb"/>
    <Configuration ID="0" Name="Publishing" MasterUrl="_catalogs/masterpage/v4.master"> 

          <Lists>
            <List FeatureId="00BFEA71-2062-426C-90BF-714C59600103" Type="103" Title="$Resources:core,linksList;" Url="$Resources:core,lists_Folder;/$Resources:core,links_Folder;" />
            <!--<List Title="Links" Type="103" Url="Lists/Links" />-->
            <List Title="Announcements" Type="104" Url="Lists/Announcements" />
            <List Title="Events" Type="106" Url="Lists/Events" />
            <List Title="Tasks" Url="Lists/Tasks" QuickLaunchUrl="Lists/Tasks/AllItems.aspx" Type="107" />
            <List Title="Shared Documents" Url="Shared Documents" QuickLaunchUrl="Shared Documents/Forms/AllItems.aspx" Type="101" />

          </Lists>

        <SiteFeatures>

          <!-- PublishingSite   SharePoint Server Publishing Infrastructure     f6924d36-2fa8-4f0b-b16d-06b7250180fa -->
          <Feature ID="f6924d36-2fa8-4f0b-b16d-06b7250180fa" />

        </SiteFeatures>
        <WebFeatures>
            <!-- Include the common WSSListTemplateFeatures used by CMS --> 
            <Feature ID="00BFEA71-DE22-43B2-A848-C05709900100" > </Feature>
          <Feature ID="00BFEA71-E717-4E80-AA17-D0C71B360101" > </Feature>
          <Feature ID="00BFEA71-52D4-45B3-B544-B1C71B620109" > </Feature>
          <Feature ID="00BFEA71-A83E-497E-9BA0-7A5C597D0107" > </Feature> 
          <Feature ID="00BFEA71-4EA5-48D4-A4AD-305CF7030140" > </Feature> 
          <Feature ID="00BFEA71-F600-43F6-A895-40C0DE7B0117" > </Feature>

            <Feature ID="00BFEA71-4EA5-48D4-A4AD-7EA5C011ABE5">
            </Feature>

          <!-- Publishing -->
            <Feature ID="22A9EF51-737B-4ff2-9346-694633FE4416">
                <Properties xmlns="http://schemas.microsoft.com/sharepoint/">
                    <Property Key="ChromeMasterUrl" Value=""/>
                    <Property Key="WelcomePageUrl" Value="$Resources:osrvcore,List_Pages_UrlName;/default.aspx"/>
                    <Property Key="PagesListUrl" Value=""/>
                    <Property Key="AvailableWebTemplates" Value=""/>
                    <Property Key="AvailablePageLayouts" Value=""/>
                    <Property Key="SimplePublishing" Value="true" />
                </Properties>
            </Feature>
            <Feature ID="541F5F57-C847-4e16-B59A-B31E90E6F9EA">
                <Properties xmlns="http://schemas.microsoft.com/sharepoint/">
                    <Property Key="InheritGlobalNavigation" Value="true"/>
                    <Property Key="ShowSiblings" Value="true"/>
                    <Property Key="IncludeSubSites" Value="true"/>
                </Properties>
            </Feature>
            <Feature ID="94C94CA6-B32F-4da9-A9E3-1F3D343D7ECB">
                <!-- Office SharePoint Server Publishing -->
            </Feature>

          <!--GroupWork     Group Work Lists    9c03e124-eef7-4dc6-b5eb-86ccd207cb87-->
          <Feature ID="9c03e124-eef7-4dc6-b5eb-86ccd207cb87"></Feature>

          <!-- nji publish home page-->
          <Feature ID="f262bb46-6155-440b-b236-14cf89902341"></Feature>
        </WebFeatures>    

    </Configuration>
</Configurations>    

share|improve this question
    
Hmmm... im not sure, but maybe the Links list instance is missing. Can you show the whole error of the ULS log? –  hupseb Mar 28 '13 at 15:59
add comment

1 Answer

If your BaseConfigurationID="0" then,

Make sure you have:

< List FeatureId="00BFEA71-2062-426C-90BF-714C59600103" Type="103" Title="$Resources:core,linksList;" Url="$Resources:core,lists_Folder;/$Resources:core,links_Folder;" />

under Configurations >> Configuration >> Lists

Try to add the list in the following way:

<View List="$Resources:core,lists_Folder;/$Resources:core,links_Folder;" BaseViewID="0" MobileView="TRUE" WebPartZoneID="Right" WebPartOrder="1" />
share|improve this answer
    
It is not working. I can deploy it, but when I create a new site it gives me an error: Cannot complete this action. Please try again. Correlation id : {some guid} –  KHA Mar 29 '13 at 10:39
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.