Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

TaxonomyExtensions.ImportTermSet does not use the LCID provided in the input #662

Closed
DeChrist opened this issue Jul 11, 2016 · 3 comments
Closed

Comments

@DeChrist
Copy link

Which PnP repository is impacted by this issue in PnP-Sites-Core?

Category

[X ] Bug
[ ] Enhancement

Environment

[ X] Office 365 / SharePoint Online (unconfirmed)
[ X] SharePoint 2016 (unconfirmed)
[ X] SharePoint 2013 (tested)

If SharePoint on-premises, what's exact CU version: December 2015

Expected or Desired Behavior

The documentation explicitly states that the CSV input file has a column "LCID" that determines which LCID will be used to import the terms in the row (same format and behavior as the web based import).

Observed Behavior

When providing a LCID that differs from the default Term Store LCID, the Import does not work.
I used the PowerShell CmdLet "Import-SpoTermSet" to test (this cmdlet relies on the method in the title to do its job).

Steps to Reproduce

Create an Excel matching the expected format with two tabs: one with terms using the default LCID (typically 1033) and another with a non-default LCID (1036 f.i.).
Export both to CSV's.
Use "Import-SpoTermSet" on the 1033 CSV: it works as expected.
Use "Import-SpoTermSet" on the 1036 CSV: the import crashes on an exception "Failed to read from or write to database"
(more details in ULS: "Cannot insert duplicate key row in object 'dbo.ECMTerm' with unique index 'IX_ECMTerm_PartitionIdUniqueId")

Context

I traced the actual implementation of this feature to the method "ImportTermSetImplementation".
It is clear from the code that it works as coded and not as designed (e.g. the comment line "//lcid = this.GetImportLcid(termStore, lcid, lineIndex, entries);" and later "lcid = termStore.DefaultLanguage;").
I performed some testing of the Taxonomy API without the extensions, and the API allows to create and update terms in a non-default LCID (i.e. this capability is NOT missing in the API).
I think the root cause is in the method "ImportTermSetLineImport" (line 959) that does not handle this use case at all...

@jansenbe
Copy link
Contributor

jansenbe commented Feb 3, 2017

Internal testing feedback
Provisioned terms with other LCID successfully using Import-PnPTermset command

Closing issue now, feel free to re-open if it can be repro-ed using latest builds

@jansenbe jansenbe closed this as completed Feb 3, 2017
@durayakar
Copy link

Is it OK to log Import-SPOTermSet command issues here? I am having the same issue with the latest I downloaded today...

@durayakar
Copy link

And I am getting : We couldn’t find any repositories matching 'org:SharePoint Import-SPOTermSet'...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants