Open sebastienlevert opened 5 years ago
Ah ClientSidePages. Currently in SharePoint Online ony the home page is being exported. I created a ticket to change this behavior: #2124 Provisioning though works for all pages manually added to the template.
As for on-prem I assume that the capabilities of the ClientSidePages might be different (more layout options in SPO, more available web parts). So the provisioning engine would have to handle this.
Apart from that the #if !ONPREMISES
seems to be from 2017. So maybe this is indeed outdated and could be changed to include SharePoint 2019 - @jansenbe ?
Any updates about this issue?
Same behavior in my environment (SP 2019 v16.0.10337.12109).
If I try to apply a PnP template using with a ClientSidePage, the step is ignored, the page isn't created.
If I export a template using Get-PnPProvisioningTemplate using Handler.All the Welcome Page is not included in the generated template, and if I use Handler.PageContents the generated template is empty (only including the pnp.ProvisiningTemplate tag in the xml file)
I'm using SharePointPnPPowerShell2019 powershell library v3.13.1909.0
I tried it with the .Net CSOM library and, as it's expected, the result was the same.
I guess while this doesn't work the option to create pages in the site provisioning in SP 2019 is programatically. I don't know if anybody has other ideas/suggestions about this..
Thanks in advance!
This issue should be resolved with PR: https://github.com/SharePoint/PnP-Sites-Core/pull/2412
The code preventing the ObjectClientSidePages
from being available for SP 2019 was changed to:
Can anybody confirm, if it works now?
Category
Environment
If SharePoint on-premises, what's exact CU version: 16.0.10341.20000
Expected or Desired Behavior
I would expect to have the ability to generate and to create ClientSidePages using the PnP Provisioning Template
Observed Behavior
ClientSidePages are skipped in both cases. If we generate a PnP Provisioning Template from a site (generate its home page), our PnP Template is empty. If we provide a ClientSidePage to this PnP Provisioning Template, the ClientSidePage is skipped and nothing happens.
We see this compilation directive that basically prevents the Handler to support On-Premises... I understand there is a lot more on Online, but is there a reason why the Provisioning Engine does not support this? https://github.com/SharePoint/PnP-Sites-Core/blob/master/Core/OfficeDevPnP.Core/Framework/Provisioning/ObjectHandlers/ObjectClientSidePages.cs#L17
Steps to Reproduce
We get the following template :
And we're using the following PnP Template