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:
Null ref exception in media section
Hi,
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:
I have submitted a potential fix for the code here:
https://github.com/rickliveshere/Umbraco-CMS/compare/4.9.1?expand=1
Related to issue U4-2641:
http://issues.umbraco.org/issue/U4-2641
Thanks,
Rick
is working on a reply...