1

I'm trying to migrate some site structure from SP2013 to SP Online. I have extracted data from the site through Get-PnPProvisioningTemplate. I've cut out all unnecessary stuff and try to Apply-PnPProvisioningTemplate on SP Online site collection, but I'm having constant PS errors. I've come to the point where I'm trying to move template in parts. I have succesfully transfered SiteFields (but I still don't understand why only few Site Columns from all imported show up in the Site Columns gallery), I can see them all through Get-PnPField. The problem is now with Content Types. I'm starting with just one CT having only a few of the columns in the template:

    <pnp:ContentType ID="0x0100EBFF7D6A8C574E3790FCBF717134EC3D" Name="Investment Request Content Type" Description="Investment Request Content Type" Group="Investment Place" NewFormUrl="" EditFormUrl="" DisplayFormUrl="">
      <pnp:FieldRefs>

        <pnp:FieldRef ID="2503b8cb-076d-4b65-8483-a3b7bee91edb" DisplayName="P3" Name="_x0050_3"  />
        <pnp:FieldRef ID="da700548-cf91-4044-8613-d7201906b05e" DisplayName="P4" Name="_x0050_4"  />
        <pnp:FieldRef ID="92e092bb-542b-44f1-be3e-265a83136ac8" DisplayName="P5" Name="_x0050_5"  />
        <pnp:FieldRef ID="ccf4b4ea-1e2a-4b9b-bb7e-3c87bfb75e80" DisplayName="P6" Name="_x0050_6"  />

      </pnp:FieldRefs>
    </pnp:ContentType>

And when trying to Apply-PnPProvisioningTemplate, I'm getting:

powershell.exe Error: 0 : 2021-02-04 18:46:19.1155      [SchemaFormatter]       [0]     [Error] Template is not valid: The 'DisplayName' attribute is not declared.                   0ms
powershell.exe Error: 0 : 2021-02-04 18:46:19.1155      [SchemaFormatter]       [0]     [Error] Template is not valid: The 'DisplayName' attribute is not declared.                   0ms
powershell.exe Error: 0 : 2021-02-04 18:46:19.1155      [SchemaFormatter]       [0]     [Error] Template is not valid: The 'DisplayName' attribute is not declared.                   0ms
powershell.exe Error: 0 : 2021-02-04 18:46:19.1155      [SchemaFormatter]       [0]     [Error] Template is not valid: The 'DisplayName' attribute is not declared.                   0ms
powershell.exe Error: 0 : 2021-02-04 18:46:19.1155      [SchemaFormatter]       [0]     [Error] Template is not valid: The 'DisplayName' attribute is not declared.                   0ms

Obviously, the DisplayName attribute is declared for all the FieldRefs. Removing DisplayName and/or Name attributes result in combination of different errors. I have no clue what to do with this. Also, the definition of the fields in SiteFields section:

    <Field DisplayName="P3" Type="Number" Group="Investment Place" ID="{2503b8cb-076d-4b65-8483-a3b7bee91edb}"  StaticName="_x0050_3" Name="_x0050_3" ColName="float13"   Required="FALSE"  />
    <Field DisplayName="P4" Type="Number" Group="Investment Place" ID="{da700548-cf91-4044-8613-d7201906b05e}"  StaticName="_x0050_4" Name="_x0050_4" ColName="float14"   Required="FALSE"  />
    <Field DisplayName="P5" Type="Number" Group="Investment Place" ID="{92e092bb-542b-44f1-be3e-265a83136ac8}"  StaticName="_x0050_5" Name="_x0050_5" ColName="float15"   Required="FALSE"  />
    <Field DisplayName="P6" Type="Number" Group="Investment Place" ID="{ccf4b4ea-1e2a-4b9b-bb7e-3c87bfb75e80}"  StaticName="_x0050_6" Name="_x0050_6" ColName="float16"   Required="FALSE"  />
 

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.