pnp / PnP-PowerShell

SharePoint PnP PowerShell CmdLets

Home Page:https://pnp.github.io/powershell

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

TheInvoker opened this issue · comments

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?

  • PnP PowerShell for SharePoint Online

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

3.26.20...

How did you install the PnP-PowerShell Cmdlets?

  • Installed through the PowerShell Gallery with Install-Module