Closed mahesh2005 closed 5 years ago
Hi! would you be able to provide with the exact cmdlet parameters you used to export and import them?
@erwinvanhunen I have updated the Issue with the command i used for exporting the term store. Basically i used
Export-PnPTermGroupToXml -FullTemplate -Out "FolderPath\Output.xml"
and
Import-PnPTermGroupFromXml -Path "FolderPath\Output.xml
The error I get when attaching the debugger is
The element 'AdditionalAdministrators' in namespace 'http://schemas.dev.office.com/PnP/2019/03/ProvisioningSchema' has incomplete content. List of possible elements expected: 'User' in namespace 'http://schemas.dev.office.com/PnP/2019/03/ProvisioningSchema'.
So this is the same as https://github.com/SharePoint/PnP-Sites-Core/issues/2188
Internally a template is created using the latest schema. The version in the template file is not respected. This is the second instance of such code I come across. (Shouldn't the format of the template be respected and maintained? But this is another topic.)
So fixing the linked issue should fix this error as well.
This issue has been automatically marked as stale because it has marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within next 7 days of this comment. Thank you for your contributions to SharePoint Developer activities.
Closing issue due no response from original author. If this issue is still occurring, please open a new issue with additional details. Notice that if you have included another related issue as additional comment on this, please open that also as separate issue, so that we can track it independently.
Hi,
I am getting similar error with Import-PnPTermGroupFromXml in SPO using version 3.19.2003.0. Also tested with FullTemplate and with adding XML declaration element manually in the beginning of file but still same error -> "Import-PnPTermGroupFromXml : Data at the root level is invalid. Line 1, position 1."
I am using the PNP Module in SP 2016 (16.0.4600.1000) on prem environment.
I was able to successfully export my term groups using export-pnptermgroupfromxml command in farm A.
Command used for Exporting:
Export-PnPTermGroupToXml -FullTemplate -Out "FolderPath\Output.xml"
When i tried to import the XML file in farm B(same configuration as farm A) using
Import-PnPTermGroupFromXml -Path "C:\folder\file.xml
i got the following error: Import-PnPTermGroupFromXml : The provided template is not valid!First few lines of the export file look like this: `<?xml version="1.0"?>