2013-08-30

My SharePoint Version : Sharepoint 2013 On Premise (French) + CU August 2013 + English language Pack

When you upgrade metadata service application (from SP2010 farm) and you go to the administration of your user profile service application, if you try to add or modify a property, you could get an unexpected exception:

Exception: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary

Explanation:

After several days of search, I have discovered that, by default, when you create a new metadata service application (empty = not upgraded from SP2010), the Taxonomy term store contains by default 3 term set group :

–          People

–          Search Dictionaries

–          System

The problem appears when you create a metadata service application from a SP2010 database (upgrade). When Sharepoint mount the existing database, he upgrades automatically the database.

Issue 1:  

During the upgrade of the data, he has to create the missing term set groups (People, Search Dictionaries) which were not in SP2010, but he does it only if “you have provisioned the State service application before you provision the Managed Metadata service application” (for more details be read: http://www.jrjlee.com/2013/02/the-search-dictionaries-term-store.html)

« The Search Dictionaries term set group is not created when you provision the Search service application, it’s created when you provision the Managed Metadata service application. When you create a Managed Metadata service application, it should create the Search Dictionaries and the People term set groups in addition to the System group. However, this will only happen if you have provisioned the State service application before you provision the Managed Metadata service application. »

So if you provision the state service application and then upgrade your metadata service application, it should work…but only if you have an English Sharepoint (default language).

Issue 2:

Because during upgrade of the database (from SharePoint 2010), « Search Dictionaries » term set group and their Term Sets are added but they are created only in English (1033). So if your Sharepoint is in French or another language, the term set group “Search Dictionaries” is corrupted, and unusable, and you will have an issue when using some Sharepoint services functionalities (or apps) which need this term set group.

Example: When you go to the administration of your user profile service application, if you try to add or modify a property, you will get an exception because the user profile service might use “Search Dictionaries” term set group but it doesn’t exist in your default language.

Workaround:

To solve this issue, I was going in the table ECMTermSet and remove the corrupted Term set:

–          1033|Company Exclusions

–          1033|Company Inclusions

–          1033|Query Spelling Exclusions

–          1033|Query Spelling Inclusions

And then go to the administration of metadata service application and remove “search dictionaries” term set group and finally create:

– “Rechercher des dictionnaires” term sets group (please use the correct name for your default language)

  • “Compagnie des Inclusions” termset
  • “Exclusions de la société” term set
  • “Requête d’inclusions orthographiques” term set
  • “Requête orthographe Exclusions” term set

 

For me, it solved the issue.

About the author 

Fabien Bidet