pnp / PnP-PowerShell

SharePoint PnP PowerShell CmdLets
https://pnp.github.io/powershell
Other
989 stars 663 forks source link

Apply-SPOProvisioningTemplate : Sequence contains more than one matching element #1613

Open Mythos1979 opened 6 years ago

Mythos1979 commented 6 years ago

Reporting an Issue or Missing Feature

Error in Apply-SPOProvisioningTemplate when template contain custom list

Steps to reproduce behavior

    <pnp:ListInstance Title="Snodo" Description="" DocumentTemplate="" TemplateType="100" Url="Lists/Snodo" MinorVersionLimit="0" MaxVersionLimit="0" DraftVersionVisibility="0" TemplateFeatureID="00bfea71-de22-43b2-a848-c05709900100" ContentTypesEnabled="true" EnableFolderCreation="false" DefaultDisplayFormUrl="{site}/Lists/Snodo/DispForm.aspx" DefaultEditFormUrl="{site}/Lists/Snodo/EditForm.aspx" DefaultNewFormUrl="{site}/Lists/Snodo/NewForm.aspx" ImageUrl="/_layouts/15/images/itgen.png?rev=44" IsApplicationList="false" ValidationFormula="" ValidationMessage="">
      <pnp:ContentTypeBindings>
        <pnp:ContentTypeBinding ContentTypeID="0x0100FAE66F30F4954F2E9997EB0F1B0C473B00E8A4DC39913A438A9FD32FDB1C1B9989" Default="true" />
        <pnp:ContentTypeBinding ContentTypeID="0x0100FAE66F30F4954F2E9997EB0F1B0C473B" />
        <pnp:ContentTypeBinding ContentTypeID="0x0120" />
      </pnp:ContentTypeBindings>
      <pnp:Views>
        <View Name="{B0016835-EED4-4FAC-91B9-6AB248B9A848}" DefaultView="TRUE" MobileView="TRUE" MobileDefaultView="TRUE" Type="HTML" DisplayName="Tutti gli elementi" Url="/sites/intranet-test/it-it/consensi/Lists/Snodo/AllItems.aspx" Level="1" BaseViewID="1" ContentTypeID="0x" ImageUrl="/_layouts/15/images/generic.png?rev=44">
          <Query>
            <OrderBy>
              <FieldRef Name="ID" />
            </OrderBy>
          </Query>
          <ViewFields>
            <FieldRef Name="LinkTitle" />
          </ViewFields>
          <RowLimit Paged="TRUE">30</RowLimit>
          <JSLink>clienttemplates.js</JSLink>
        </View>
      </pnp:Views>
      <pnp:Fields>
        <Field ID="{3a6b296c-3f50-445c-a13f-9c679ea9dda3}" Hidden="FALSE" ReadOnly="TRUE" Required="FALSE" Type="Text" Name="ComplianceAssetId" ShowInFileDlg="FALSE" DisplayName="ID risorsa conformità" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="ComplianceAssetId" FromBaseType="TRUE" ColName="nvarchar3" />
        <Field ID="{8382d247-72a9-44b1-9794-7b177edc89f3}" Type="Computed" ReadOnly="TRUE" Name="_IsRecord" DisplayName="L'elemento è un record" DisplaceOnUpgrade="TRUE" SchemaVersion="16.0.93.0" RecreateIfMissing="TRUE" NoCustomize="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="_IsRecord" FromBaseType="TRUE">
          <FieldRefs>
            <FieldRef Name="_ComplianceFlags" />
          </FieldRefs>
          <DisplayPattern>
            <Switch>
              <Expr>
                <LookupColumn Name="_ComplianceFlags" />
              </Expr>
              <Case Value="1">
                <HTML>Sì</HTML>
              </Case>
              <Case Value="3">
                <HTML>Sì</HTML>
              </Case>
              <Default>
                <HTML>No</HTML>
              </Default>
            </Switch>
          </DisplayPattern>
        </Field>
      </pnp:Fields>
      <pnp:FieldRefs>
        <pnp:FieldRef ID="a8d3d5fd-66dc-449c-a325-a9d591f67f4d" Name="AlitaliaLink" DisplayName="Collegamento" />
        <pnp:FieldRef ID="b91d2907-4fbd-42af-a0a4-9a2ed9eb33c2" Name="AlitaliaLinkViewOrder" DisplayName="Ordine di visualizzazione" />
        <pnp:FieldRef ID="f21252c0-8813-44bb-bff2-884cf7004673" Name="AlitaliaLinkBehavior" DisplayName="Apri Collegamento in nuova scheda" />
        <pnp:FieldRef ID="b3f0981b-896c-45df-90eb-92dde59770cc" Name="AlitaliaLinkImage" DisplayName="Immagine per il Collegamento" />
      </pnp:FieldRefs>
    </pnp:ListInstance>

Which version of the PnP-PowerShell Cmdlets are you using?

What is the version of the Cmdlet module you are running?

2.

How did you install the PnP-PowerShell Cmdlets?

phettz commented 6 years ago

Have the same issue

tingxie77 commented 6 years ago

having the same issue without any update to default custom list

4lexk commented 6 years ago

same here

richardb52 commented 6 years ago

Not sure what is causing the issue, but removing TemplateFeatureID="00bfea71-de22-43b2-a848-c05709900100" for the custom list in question got around the issue for me.

jdubreui commented 6 years ago

@richardb52 Exactly the same behavior and your solution worked for me !!!! Thanks a lot, save me a lot of time

thisismoather commented 6 years ago

I'm having the same issue.

dremillard commented 5 years ago

@richardb52 ... your solution worked for me too. Thanks!

joelfmrodrigues commented 5 years ago

@richardb52 thanks, that worked. We have a provisioning process for project sites that was running for a long time and this error just randomly started this week...really strange...