Open oppie85 opened 5 years ago
Additional information; it seems like information is being cached in the ClientContext - I've tried working around this issue by automatically splitting the template into unique templates for each page and applying those successively, but even then the error occurs. When I do the same thing but apply each template in its own isolated ClientContext, the error does not occur.
I'm seeing the same error, it seems to be related to setting a custom header image. If I remove the ServerRelativeImageUrl value from the template all pages create themselves just fine.
@MikeRogersDigital fix resolved the issue for me.
Thanks for this, I had the same issue and found that changing the header type to:
Done some more digging into this and you can include header images in your pages. When you get your template you need to make sure that you include -PersistBrandingFiles This fetches the site assets folder. In the folder add in some files, then reference them in the XML like so:
Category
[*] Bug [ ] Enhancement
Environment
[*] Office 365 / SharePoint Online [ ] SharePoint 2016 [ ] SharePoint 2013
Expected or Desired Behavior
I'm attempting to provision multiple ClientSidePages in a single ProvisioningTemplate object loaded from an XML file. All the ClientSidePages should be created with their content one after the other.
Observed Behavior
When applying the template to a site (any site on multiple tenants have been tested) it provisions the first 2 or 3 pages correctly, and then throws a Microsoft.SharePoint.Client.ServerException with the message "Version Conflict". Strangely enough, when I edit the template such that it only provisions one single page, even the ones that previously generated the errors now work correctly. I'm using the NuGet package SharePointPnPCoreOnline version 3.6.1902.
Steps to Reproduce
Create a ProvisioningTemplate with about 10 ClientSitePage objects and apply the template to any site. After the first few pages are processed correctly you should get a Version Conflict error.