U4-2625 - Show a friendly error when editing a Document with a missing Data Type

Created by Tom Fulton 14 Aug 2013, 20:57:46 Updated by Sebastiaan Janssen 19 Dec 2013, 07:40:08

Relates to: U4-2626

Let's say you have a Document Type that has a Property using the Google Maps datatype.

Then let's say the DLL for the datatype gets deleted, or you uninstall the package but leave the Property intact.

Now, when editing the Content node, you get the following exception:

[NullReferenceException: Object reference not set to an instance of an object.] umbraco.cms.businesslogic.Content.b__e(Property x) +103 System.Linq.WhereSelectEnumerableIterator2.MoveNext() +247 System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable`1 collection) +551 umbraco.cms.businesslogic.Content.InitializeProperties() +270 umbraco.cms.businesslogic.Content.getProperty(String alias) +59 umbraco.controls.ContentControl.LoadPropertyTypes(IContentTypeComposition contentType, TabPage tabPage, Hashtable inTab, Int32 tabId, String tabCaption) +333 umbraco.controls.ContentControl.CreateChildControls() +709 System.Web.UI.Control.EnsureChildControls() +188 umbraco.controls.ContentControl.OnInit(EventArgs e) +50 System.Web.UI.Control.InitRecursive(Control namingContainer) +185 System.Web.UI.Control.AddedControl(Control control, Int32 index) +188 umbraco.cms.presentation.editContent.OnInit(EventArgs e) +1230 System.Web.UI.Control.InitRecursive(Control namingContainer) +185 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2097

It might be nice to show a friendlier message here, ie "The datatype for property x couldn't be loaded"


Damiaan Peeters 07 Nov 2013, 16:00:59

Just stumbled upon this. Would have saved me some time :-)

Sebastiaan Janssen 19 Dec 2013, 07:40:05

For reference, pull request: https://github.com/umbraco/Umbraco-CMS/pull/128/files

Priority: Normal

Type: Exception

State: Fixed

Assignee: Shannon Deminick

Difficulty: Easy

Category: Editor

Backwards Compatible: True

Fix Submitted: Pull request

Affected versions: 6.1.2

Due in version: 6.2.0


Story Points: