I'm trying to get a template using the latest PnP PowerShell release with Get-PnPProvisioningTemplate.
I'm getting the following error:
Get-PnPProvisioningTemplate : The file is not checked out. You must first check out this document before making changes. At C:\PVSource\ZephyrDemoIntranet\updateAll.ps1:12 char:1 + Get-PnPProvisioningTemplate -Out C:\PVSource\templ ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : WriteError: (:) [Get-PnPProvisioningTemplate], ServerException + FullyQualifiedErrorId : EXCEPTION,SharePointPnP.PowerShell.Commands.Provisioning.GetProvisioningTemplate
After I enabled debug I can see that the problem is something to do with the page contents of the page that I'm trying to export.
So even though it doesn't make any sense, I checked out my welcome page and now the Get-PnPProvisioningTemplate works as expected.
I haven't exported a publishing site for a while. Has anyone else seen the same issue?