Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Richard Read 16 posts 47 karma points c-trib
    Aug 19, 2013 @ 11:31
    Richard Read

    Null ref exception in media section


    We have developed a site using Umbraco 4.9.1 and noticed that we were getting null ref exceptions whenever we attempt to access images after uploading. Looking at the stack trace, there appears to be an issue with passing back null from a property type description when new controls are generated. Stacktrace is included below:

    Object reference not set to an instance of an object.

    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.NullReferenceException: Object reference not set to an instance of an object.

    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: 

    [NullReferenceException: Object reference not set to an instance of an object.]
       umbraco.cms.businesslogic.propertytype.PropertyType.get_Description() +487
       umbraco.controls.ContentControl.addControlNew(Property p, TabPage tp, String Caption) in d:\Dropbox\Dev\UmbracoSource_v4\src\Umbraco.Web\umbraco.presentation\umbraco\controls\ContentControl.cs:398
       umbraco.controls.ContentControl.CreateChildControls() in d:\Dropbox\Dev\UmbracoSource_v4\src\Umbraco.Web\umbraco.presentation\umbraco\controls\ContentControl.cs:138
       System.Web.UI.Control.EnsureChildControls() +181
       umbraco.controls.ContentControl.OnInit(EventArgs e) in d:\Dropbox\Dev\UmbracoSource_v4\src\Umbraco.Web\umbraco.presentation\umbraco\controls\ContentControl.cs:178
       System.Web.UI.Control.InitRecursive(Control namingContainer) +132
       System.Web.UI.Control.AddedControl(Control control, Int32 index) +276
       umbraco.cms.presentation.editMedia.OnInit(EventArgs e) in d:\Dropbox\Dev\UmbracoSource_v4\src\Umbraco.Web\umbraco.presentation\umbraco\editMedia.aspx.cs:92
       System.Web.UI.Control.InitRecursive(Control namingContainer) +132
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean inc


    I have submitted a potential fix for the code here:


    Related to issue U4-2641:




Please Sign in or register to post replies

Write your reply to: