Insert Media Link dialog for the General Link field may delete the wrong item


Description

The wrong item may be deleted when a user tries to delete an item while navigating the media library tree from the Insert Media Link dialog of the General Link field. Sitecore deletes the item currently selected in the content tree, not the item the user right-clicked on to show a popup menu that contains the Delete option.

Solution

To have Sitecore always delete the item that the user right-clicks on, perform the following actions:

  1. Copy the Sitecore.Support.363386.dll assembly to the /bin folder of your web site.
  2. Replace the following line in the /Website/sitecore/shell/Applications/Dialogs/MediaLink/MediaLink.xml file:
    <CodeBeside Type="Sitecore.Shell.Applications.Dialogs.MediaLink.MediaLinkForm,Sitecore.Client"/> 
    with the following one: 
    <CodeBeside Type="Sitecore.Support.Shell.Applications.Dialogs.MediaLink.MediaLinkForm,Sitecore.Support.363386"/>