Monday, March 26, 2012

Duplicated Taxonomy Items

Recently one of our customers asked me, why he gets occasionally an error stating “The operation cannot be completed. The term store may be unavailable.”, when he edits the terms using the Managed Metadata service application (MMS) management user interface (UI).

Firure 1: Incorrect error massage for a duplicated label
I was looking at the ULS logs and didn’t find anything, what would indicate unavailability of the MMS or the term store, but time to time I came across different “Unexpected” error related in the Taxonomy category. The error was reporting that a label is duplicated.

Figure 2: ULS log message for the unexpected error
I tried to test the same in my lab and found, that the error message about the unavailable term store is really related to a case, when the client accidently saves a label, which already exists for the term in particular language. It is actually a cosmetic bug in the MMS management UI, but can make some users confused.

I spent few more minutes to find out when the user can get such an error. I tried to create duplicated term set and term, but in such cases the UI shoes correct error message and deletes the incomplete duplicated item from the term store structure, so that the user do not try to save the item again. I also tried to create a duplicated term label using SharePoint object model (OM) and the error message I’ve got was also correct. So the only case when the user gets the confusing error message is when he tries to save a duplicated label using the management UI. The UI behaves little bit strange, when the user press the “Save” button. The duplicated label remains in the list of labels for the term, and appears to be correctly saved, but when you move to a different item in the term store structure and later return to this term, the label has gone.

Figure 3: Duplicated label appears to be saved
The incorrect error message and the term label saving behavior are consistent in SharePoint Server 2010 RTM and SP1 + June 2011 Cumulative Update environments.

No comments:

Post a Comment