diff --git a/src/umbraco.cms/businesslogic/Property/Property.cs b/src/umbraco.cms/businesslogic/Property/Property.cs index b7450612bd..8adac0d7e3 100644 --- a/src/umbraco.cms/businesslogic/Property/Property.cs +++ b/src/umbraco.cms/businesslogic/Property/Property.cs @@ -8,6 +8,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 { @@ -62,6 +63,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 00ec1efb0b..586bedf75c 100644 --- a/src/umbraco.cms/businesslogic/media/Media.cs +++ b/src/umbraco.cms/businesslogic/media/Media.cs @@ -381,6 +381,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 25482f2f7b..d848667400 100644 --- a/src/umbraco.cms/businesslogic/web/Document.cs +++ b/src/umbraco.cms/businesslogic/web/Document.cs @@ -1423,6 +1423,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);