Mar 24 2017 09:01 AM - edited Mar 24 2017 09:03 AM
Apply-PnPProvisioningTemplate : Referenced content type 0x01010029AB996A778A324EAEF918C866ECBD19 not available in site
or in template
I am using Get-PnPProvisioningTemplate to create a template (as an XML) file. When I use Apply-PnPProvisioningTemplate, I get Referenced content type 0x01010029AB996A778A324EAEF918C866ECBD19 not available in site
or in template.
<---Error--->
PS C:\WINDOWS\system32> Connect-PnPOnline -Url https://<tenant>.sharepoint.com/sites/templates
PS C:\WINDOWS\system32> Get-PnPProvisioningTemplate -PersistBrandingFiles -PersistPublishingFiles -Out $path;
PS C:\WINDOWS\system32> $web = New-PnPWeb -Title "ERP Template Test" -Url ERPTemplate -Description "ERP Template Test Si
te" -Locale 1033 -Template "PROJECTSITE#0"
PS C:\WINDOWS\system32> Write-Output $("Applying PnP template [{0}] to site [{1} ({2})]..." -f $path, $web.Title, $web.U
rl);
Applying PnP template [C:\PnP\ERPTemplate.xml] to site [ERP Template Test (https://<tenant>.sharepoint.com/sites/templates/ERPTemplate)]...
PS C:\WINDOWS\system32> Apply-PnPProvisioningTemplate -Path $path;
WARNING: The source site from which the template was generated had a base template ID value of PROJECTSITE#0, while the
current target site has a base template ID value of STS#0. Thus, there could be potential issues while applying the
template.
Apply-PnPProvisioningTemplate : Referenced content type 0x01010029AB996A778A324EAEF918C866ECBD19 not available in site
or in template
At line:1 char:1
+ Apply-PnPProvisioningTemplate -Path $path;
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (:) [Apply-PnPProvisioningTemplate], Exception
+ FullyQualifiedErrorId : EXCEPTION,SharePointPnP.PowerShell.Commands.Provisioning.ApplyProvisioningTemplate
The script and XML are attached.
Mar 31 2017 01:39 AM
This is the clue:
WARNING: The source site from which the template was generated had a base template ID value of PROJECTSITE#0, while the
current target site has a base template ID value of STS#0. Thus, there could be potential issues while applying the
Because the site that you are applying the tmeplate too isn't of the same base tmeplate as where you created the tmeplate form you will see thse kind of errors.
Apr 01 2017 02:52 AM
Hi @Techresa Pieter is Right and it could be that the project template uses different features as well.
So recreate the site with the correct template i think everything will work perfect then.