Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[BUG] Import-PnPTermGroupFromXml creates terms with incorrect translations #3603

Open
1 of 6 tasks
jagopauwels opened this issue Nov 27, 2023 · 3 comments
Open
1 of 6 tasks
Labels
bug Something isn't working

Comments

@jagopauwels
Copy link
Contributor

Reporting an Issue or Missing Feature

After using Export-PnPTermGroupFromXml, I import the group using Import-PnPTermGroupFromXml. This results in the terms having the English instead of the Dutch translation.

Expected behavior

Create the terms with the correct translation

Actual behavior

The Dutch translation contains English
After import

Steps to reproduce behavior

  1. My tenant is in Dutch. I create a term called "Test term NL" and give it an English translation "Test term EN"
    Original

  2. I Export the group using Export-PnPTermGroupFromXml. The name of the term element is the English name (no idea of this is expected behavior). It does list the translations correctly.
    xml

  3. I delete the Test termset

  4. I import the group using Import-PnPTermGroupFromXml. This results in the term being recreated but with the English text showing up as Dutch.
    After import

What I think happens

What I think causes this bug is:

  1. The term doesn't exist so it is created. It creates it with the value in the "Name" attribute that is in English, but since the tenant is in Dutch it is now wrongly labeled as Dutch.
  2. It goes on to create the lables, the fist one is English. This lable is new so it is created.
  3. Next is the Dutch label, this label already exists so it is skipped...

And now we have English in both lables and lose the Dutch label!

What is the version of the Cmdlet module you are running?

PnP.PowerShell 2.2.0

Which operating system/environment are you running PnP PowerShell on?

  • Windows

  • Linux

  • MacOS

  • Azure Cloud Shell

  • Azure Functions

  • Other : please specify

@jagopauwels jagopauwels added the bug Something isn't working label Nov 27, 2023
@gautamdsheth
Copy link
Collaborator

@jagopauwels - can you please try it with latest version of PnP PowerShell 2.3.0 and check ? I think we made some fixes related to this and might help if you specify LCID parameter.

@jagopauwels
Copy link
Contributor Author

I upgraded to PnP PowerShell 2.3.0 but the behavior is the same.
What do you mean with "if you specify LCID parameter"? Neither Export-PnPTermGroupFromXml nor Import-PnPTermGroupFromXml have an LCID parameter.

@koskila
Copy link
Contributor

koskila commented Oct 26, 2024

We fixed applying labels in PnP.Framework (with pnp/pnpframework#934) but looks like this is using some completely unrelated code.

I had to fix one small bug in Export-PnPTermGroupToXml (pnp/pnpframework#1075) to be able to export my terms, but I couldn't reproduce the issue with the latest PnP PowerShell versions. I wonder if this has been fixed since January? Can you still reproduce it @jagopauwels ?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants