Post Pic

ERROR CREATING CONTROL FOR NODETYPE: Media

I have just finished another upgrade from umbraco 3.06 to v4.0.2.1 and hit a snag whereby whenever a user attempted to add a new media item after the upgrade they were presented with the following exception:

ERROR CREATING CONTROL FOR NODETYPE: Media

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: ERROR CREATING CONTROL FOR NODETYPE: Media

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

[ArgumentException: ERROR CREATING CONTROL FOR NODETYPE: Media]
   umbraco.cms.presentation.Create.Page_Load(Object sender, EventArgs e) +415
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +33
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   umbraco.BasePages.BasePage.OnLoad(EventArgs e) +12
   System.Web.UI.Control.LoadRecursive() +47
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436

After a bit of digging I discovered the following Work Item on CodePlex and the following comment from jvisch which provided me with the solution:

  1. Open the UI.xml file located in /umbraco/config/create
  2. Search for the node with the alias ‘media
  3. Change the alias to ‘Media’ with a capital M
  4. Save the file
  5. Restart the website by making a slight change to the web.config file and saving it

Umbraco Certified Developer
SagePay Approved Partner
Creative Market