pnp / PnP-PowerShell

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

[BUG] Creating items in PnP Provisioning in SP Online site templates does not work #3010

Open TheInvoker opened 3 years ago

TheInvoker commented 3 years ago

Reporting an Issue or Missing Feature

I am creating templates using the PnP provisioning but am noticing the items are not being created. I have this template.json file

{
    "$schema":"https://aka.ms/sppnp-extract-configuration-schema",
    "persistAssetFiles": false,
    "handlers": [
        "Lists",
        "WebSettings",
        "Pages"
    ],
    "lists": {
        "lists": [
            {
                "title": "MyData",
                "includeItems": true
            }
        ]
    },
    "pages": {
        "includeAllClientSidePages": true
    }
}

and the exported XML file has the datarows data in it, but when I apply it to a site, the lists that get created don't have the data in it. Does anyone know what's wrong?

Expected behavior

Items to be created in list

Actual behavior

Items not getting created in list

Steps to reproduce behavior

  1. Create a site and a list MyData in it with some data
  2. Save it using Get-PnPProvisioningTemplate -Configuration "template.json" -Out "template.xml" -Force
  3. Create new site and apply template to it using Apply-PnPProvisioningTemplate -Path "template.xml"

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

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

3.26.20...

How did you install the PnP-PowerShell Cmdlets?