Forum Discussion
Exporting team sites fails
I have just tried to export a standard team site with a few custom columns and when I apply the template I'm getting
Apply-SPOProvisioningTemplate : The provided template is not valid!
then I tried the same again with Set-SPOtraceLog ( see: https://veenstra.me.uk/2016/07/29/office-365-sharepoint-how-to-debug-pnp-provisioning-engine/ ) set to Debug.
Now i'm getting a clue:
PS U:\> Apply-SPOProvisioningTemplate -Path U:\Source\\Home\template.xml
PowerShell_ISE.exe Information: 0 : 2016-09-09 15:17:42.8627 [OfficeDevPnP.Core] [0] [Information] File template.xml retrieved from folder 0ms
PowerShell_ISE.exe Information: 0 : 2016-09-09 15:17:42.8843 [OfficeDevPnP.Core] [0] [Information] File template.xml retrieved from folder 0ms
PowerShell_ISE.exe Error: 0 : 2016-09-09 15:17:42.9156 [SchemaFormatter] [0] [Error] Template is not valid: The element 'Workflows' in namespace 'http://schemas.dev.offic
e.com/PnP/2016/05/ProvisioningSchema' has incomplete content. List of possible elements expected: 'WorkflowSubscriptions' in namespace 'http://schemas.dev.office.com/PnP/
2016/05/ProvisioningSchema'. 0ms
looking at the xml file that I'm applying I can see that there are no workflow subscriptions within the template file.
I'm using the latest release (released today)
There was an unpublished workflow in my site. Publishing this workflow resolves the issue.
I think it would be better if the Get-SPOProvisioningtemplate ignored unpublished workflows. I will create an issue on github for this.
1 Reply
There was an unpublished workflow in my site. Publishing this workflow resolves the issue.
I think it would be better if the Get-SPOProvisioningtemplate ignored unpublished workflows. I will create an issue on github for this.