When uploading media items selecting the Overwrite existing media items and Make uploaded media items versionable check boxes, the fields from the unversioned template are not removed from the SharedFields table. As a result, the duplicate fields are stored in the SharedFields table and the VersionedFields table.
The issue might lead to:
Exception: System.ArgumentException Message: An entry with the same key already exists. Source: System at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.TreeSet`1.AddIfNotPresent(T item) at System.Collections.Generic.SortedDictionary`2.Add(TKey key, TValue value) at Sitecore.Data.Items.MediaItem.GetMetaData() at Sitecore.Shell.Applications.Media.MediaFolder.MediaFolderForm.RenderItem(HtmlTextWriter output, Item item) at Sitecore.Shell.Applications.Dialogs.Folders.FolderBaseForm.RenderItems(HtmlTextWriter output, Item item) at Sitecore.Shell.Applications.Dialogs.Folders.FolderBaseForm.Render() at Sitecore.Shell.Applications.Media.MediaFolder.MediaFolderForm.OnLoad(EventArgs e)
To resolve the issue, consider one of the following options:
To mitigate the issue:
Note: Make sure that you back up the Master database before running the query.