Small bug with Customize your term site columns

I was playing with a site template for an Enterprise Wiki that can be exported to DOCX along with some other wiki models for governance.  I kept having issues with the default “Wiki Categories” column which was throwing exceptions when saving a page.  Upon inspecting the column, I could see that the metadata tree wasn’t showing up correctly (well it was empty!).

First thing I looked was the permissions on the Managed Metadata Service (MMS) and it was fine.  I tried creating another metadata column and, when I was clickong on “Customize your term set”, I was getting a pop-up error saying the service might not be available.  I looked at the ULS log and found that I was getting an ArgumentException on the CreateGroup method, but I couldn’t find the group name.  Using Fiddler, I found that it was using the “Untitled” group name.

As it turns out, if you do not enter a column name and click on that radio button, it automatically creates a group named “Untitled”.  If you cancel the column creation or browse away, the group is still there!  In fact, if you enter a column name before clicking on the radio button, it still creates the group but there’s a better error handling – if it detects that the group already exists, it will append “_1” at the end of the group title.  This doesn’t happen when it uses the default “Untitled” group name.

Unfortunately, at this point, the only fix is to always use a column name before clicking on the radio button.  The only supported way to remove that “Untitled” (and empty) group name, that I found, was to delete the MMS, or possibly through the API.  The “Term Store Management” tool, available from the Site Collection settings will also allow you to delete the group – if the site collection is still there, or if you know which one created it.

A small fix from the PG would be to use the same append with “_1” for Untitled as well.