diff --git a/src/umbraco.cms/businesslogic/Property/Property.cs b/src/umbraco.cms/businesslogic/Property/Property.cs index 8404081677..3fa6284b00 100644 --- a/src/umbraco.cms/businesslogic/Property/Property.cs +++ b/src/umbraco.cms/businesslogic/Property/Property.cs @@ -7,6 +7,7 @@ using umbraco.DataLayer; using umbraco.BusinessLogic; using umbraco.cms.businesslogic.datatype; using umbraco.cms.businesslogic.propertytype; +using umbraco.interfaces; namespace umbraco.cms.businesslogic.property { @@ -61,6 +62,14 @@ namespace umbraco.cms.businesslogic.property _pt = PropertyType.GetPropertyType(property.PropertyTypeId); _data = _pt.DataTypeDefinition.DataType.Data; _data.PropertyId = Id; + + //set the value so it doesn't need to go to the database + var dvs = _data as IDataValueSetter; + if (dvs != null) + { + dvs.SetValue(property.Value, property.PropertyType.DataTypeDatabaseType.ToString()); + } + } public Guid VersionId diff --git a/src/umbraco.cms/businesslogic/media/Media.cs b/src/umbraco.cms/businesslogic/media/Media.cs index 6dcff5792f..805ed1a567 100644 --- a/src/umbraco.cms/businesslogic/media/Media.cs +++ b/src/umbraco.cms/businesslogic/media/Media.cs @@ -380,6 +380,8 @@ namespace umbraco.cms.businesslogic.media private void SetupNode(IMedia media) { MediaItem = media; + //Also need to set the ContentBase item to this one so all the propery values load from it + ContentBase = MediaItem; //Setting private properties from IContentBase replacing CMSNode.setupNode() / CMSNode.PopulateCMSNodeFromReader() base.PopulateCMSNodeFromUmbracoEntity(MediaItem, _objectType); diff --git a/src/umbraco.cms/businesslogic/web/Document.cs b/src/umbraco.cms/businesslogic/web/Document.cs index c1d27fce58..d330a4e8dd 100644 --- a/src/umbraco.cms/businesslogic/web/Document.cs +++ b/src/umbraco.cms/businesslogic/web/Document.cs @@ -1428,6 +1428,9 @@ namespace umbraco.cms.businesslogic.web private void SetupNode(IContent content) { Content = content; + //Also need to set the ContentBase item to this one so all the propery values load from it + ContentBase = Content; + //Setting private properties from IContentBase replacing CMSNode.setupNode() / CMSNode.PopulateCMSNodeFromReader() base.PopulateCMSNodeFromUmbracoEntity(Content, _objectType);