SpaceJump
SpaceJump

Reputation: 483

Sitecore Media Library Error

When I click "Browse" on an Image field in a content item, I get the following error message (object reference not set to an instance of an object):

[NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.]
   Sitecore.Shell.Applications.Media.MediaBrowser.MediaBrowserForm.UpdateSelection(Item item) +754
   Sitecore.Shell.Applications.Media.MediaBrowser.MediaBrowserForm.OnLoad(EventArgs e) +254

[TargetInvocationException: Ein Aufrufziel hat einen Ausnahmefehler verursacht.]
   System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +0
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +1255
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +38
   Sitecore.Reflection.ReflectionUtil.InvokeMethod(MethodInfo method, Object[] parameters, Object obj) +91
   Sitecore.Web.UI.Sheer.ClientPage.OnLoad(EventArgs e) +332
   System.Web.UI.Control.LoadRecursive() +66
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyn

How can I fix this?

Upvotes: 1

Views: 557

Answers (2)

Andrés Villenas
Andrés Villenas

Reputation: 191

From my knowledge, two things could be wrong if you see that message.

  1. As @SpaceJump mentioned, maybe the MediaBrowser.xml is not in the sitecore/shell/override.
  2. MediaBrowser.xml file has an error or something is not there. In my case was that a button hadn't the ID attribute.

Ex: Before (not working)

<Button Header="Upload" Click="UploadImage"/>

After (working)

<Button ID="UploadButton" Header="Upload" Click="UploadImage"/>

Upvotes: 0

SpaceJump
SpaceJump

Reputation: 483

Found what was causing the problem. After removing the file MediaBrowser.xml in sitecore/shell/override that error message was gone. It seems there was something wrong in that overriding MediaBrowser.xml.

Upvotes: 1

Related Questions