Open adam13hylo opened 2 years ago
It seems the issue is still happening on PnP.Powershell v2.1.1 for SharePoint Online environment. The issue is already fixed for SPO Shell. Please follow up.
I encountered the same issue using PnP.Framework .NET library v.1.13.0 Any idea for a workaround ?
Related to the following issue: https://github.com/pnp/pnpframework/issues/202
Actual behavior
When running Get-PnPSiteTemplate the script fails with the error: Get-PnPSiteTemplate: An error occurred while parsing EntityName. Line 17, position 140.
Steps to reproduce
Get-PnPSiteTemplate -Out "./pnp-template.xml" -Handlers Lists
Full Exception
Message : An error occurred while parsing EntityName. Line 17, position 140. Stacktrace : at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.Throw(String res, Int32 lineNo, Int32 linePos) at System.Xml.XmlTextReaderImpl.HandleEntityReference(Boolean isInAttributeValue, EntityExpandType expandType, Int32& charRefEndPos) at System.Xml.XmlTextReaderImpl.ParseText(Int32& startPos, Int32& endPos, Int32& outOrChars) at System.Xml.XmlTextReaderImpl.FinishPartialValue() at System.Xml.XmlTextReaderImpl.get_Value() at System.Xml.Linq.XContainer.ContentReader.ReadContentFrom(XContainer rootContainer, XmlReader r) at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r) at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options) at System.Xml.Linq.XDocument.Parse(String text, LoadOptions options) at PnP.Framework.Provisioning.ObjectHandlers.ObjectHandlerBase.TokenizeListView(String xml, List list, Web web) at PnP.Framework.Provisioning.ObjectHandlers.ObjectListInstance.ExtractViews(Web web, List siteList, ListInstance list, ProvisioningTemplate template, ProvisioningTemplateCreationInformation creationInfo) at PnP.Framework.Provisioning.ObjectHandlers.ObjectListInstance.ExtractObjects(Web web, ProvisioningTemplate template, ProvisioningTemplateCreationInformation creationInfo) at PnP.Framework.Provisioning.ObjectHandlers.SiteToTemplateConversion.GetRemoteTemplate(Web web, ProvisioningTemplateCreationInformation creationInfo) at Microsoft.SharePoint.Client.WebExtensions.GetProvisioningTemplate(Web web, ProvisioningTemplateCreationInformation creationInfo) at PnP.PowerShell.Commands.Provisioning.Site.GetSiteTemplate.ExtractTemplate(XMLPnPSchemaVersion schema, String path, String packageName, ExtractConfiguration configuration) in c:\build\src\Commands\Provisioning\Site\GetSiteTemplate.cs:line 371 at PnP.PowerShell.Commands.Provisioning.Site.GetSiteTemplate.ExecuteCmdlet() in c:\build\src\Commands\Provisioning\Site\GetSiteTemplate.cs:line 149 at PnP.PowerShell.Commands.PnPSharePointCmdlet.ProcessRecord() in c:\build\src\Commands\Base\PnPSharePointCmdlet.cs:line 60 ScriptLineNumber : 1
What is the version of the Cmdlet module you are running?
Which operating system/environment are you running PnP PowerShell on?
Windows