U4-1398 - Error trying to save document with new property

Created by Sebastiaan Janssen 07 Jan 2013, 10:50:01 Updated by Sebastiaan Janssen 15 Jan 2013, 22:15:00

See error below. The SetValue method is looking for: PropertyTypes.FirstOrDefault(x => x.Alias == propertyTypeAlias);

But the just added property doesn't exist in the cache yet, so it throws.

Server Error in '/' Application.

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:

[No relevant source lines]

Source File: ContentBase.cs Line: 276

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.] Umbraco.Core.Models.ContentBase.SetValue(String propertyTypeAlias, Object value) in ContentBase.cs:276 umbraco.cms.businesslogic.web.Document.Save() +258 umbraco.cms.presentation.editContent.Save(Object sender, EventArgs e) +2664 System.EventHandler.Invoke(Object sender, EventArgs e) +0 umbraco.controls.ContentControl.saveClick(Object Sender, ImageClickEventArgs e) +530 umbraco.controls.ContentControl.savePublish(Object Sender, ImageClickEventArgs e) +56 System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +115 System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +124 System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724


Sebastiaan Janssen 15 Jan 2013, 13:02:12

This has been fixed before the beta already.

Priority: Normal

Type: Bug

State: Fixed


Difficulty: Normal


Backwards Compatible: True

Fix Submitted:

Affected versions: 6.0.0

Due in version:


Story Points: