< class="prominent-subhead ">

"An item with the same key has already been added" error when loading all items on K2 Designer

This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice. This article is not considered official documentation for K2 software and is provided "as is" with no warranties.
This article has been archived, and/or refers to legacy products, components or features. The content in this article is offered "as is" and will no longer be updated. Archived content is provided for reference purposes only. This content does not infer that the product, component or feature is supported, or that the product, component or feature will continue to function as described herein.


After upgrading to K2 5.1 and navigating to the SmartForms URL to see what forms/views are still present on the environment , you would normally click on the browse button. This fails and the spinner then hangs with an error message presented. This stops you from doing anything further here. If you refresh the page and try to hit the browse button the same error appears once again.


The error message that is presented is the following:
"An Item with the same key has already been added. when loading all items"

Troubleshooting Steps

In most cases this is caused by two categories having the same name. To resolve this you need to move the artifacts within one of the categories by copying them over to another category with a different name. Once this has been completed, you will be able to delete/remove the offending category. 
Next, close and reopen the browser, you should no longer see the error appearing here.