diff --git a/src/umbraco.cms/businesslogic/Content.cs b/src/umbraco.cms/businesslogic/Content.cs
index a94b6e45dc..fe7d5fdb25 100644
--- a/src/umbraco.cms/businesslogic/Content.cs
+++ b/src/umbraco.cms/businesslogic/Content.cs
@@ -512,6 +512,9 @@ namespace umbraco.cms.businesslogic
Guid newVersion = Guid.NewGuid();
bool tempHasVersion = hasVersion();
+
+ // we need to ensure that a version in the db exist before we add related data
+ SqlHelper.ExecuteNonQuery("Insert into cmsContentVersion (ContentId,versionId) values (" + this.Id + ",'" + newVersion + "')");
foreach (propertytype.PropertyType pt in this.ContentType.PropertyTypes)
{
object oldValue = "";
@@ -526,7 +529,6 @@ namespace umbraco.cms.businesslogic
property.Property p = this.addProperty(pt, newVersion);
if (oldValue != null && oldValue.ToString() != "") p.Value = oldValue;
}
- SqlHelper.ExecuteNonQuery("Insert into cmsContentVersion (ContentId,versionId) values (" + this.Id + ",'" + newVersion + "')");
this.Version = newVersion;
return newVersion;
}
diff --git a/src/umbraco.presentation/web.Template.UMBRACOELISE.Debug.config b/src/umbraco.presentation/web.Template.UMBRACOELISE.Debug.config
index 4b2e4bb8da..124bf94e8e 100644
--- a/src/umbraco.presentation/web.Template.UMBRACOELISE.Debug.config
+++ b/src/umbraco.presentation/web.Template.UMBRACOELISE.Debug.config
@@ -17,9 +17,9 @@
+ value="server=.\sqlexpress;database=481;user id=DBUSER;password=DBPASSWORD"/>
+ value="4.8.1"/>