From f959bfc2d51aac7fab6b02486e43b74909e1b74b Mon Sep 17 00:00:00 2001 From: "david.pendray" Date: Fri, 14 Jun 2013 16:49:28 +0100 Subject: [PATCH] Fix U4-2372 After initial version, Save and Publish only creates one version of Content Published property is no longer dirty at this point after initial publish so it's checking for it being so can't be used for determining whether a new version should be created. Instead, check if Published property is true; in which case we want to create a new version. --- src/Umbraco.Core/Persistence/Repositories/ContentRepository.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Core/Persistence/Repositories/ContentRepository.cs b/src/Umbraco.Core/Persistence/Repositories/ContentRepository.cs index 272dd6d4d428..4b708060fa25 100644 --- a/src/Umbraco.Core/Persistence/Repositories/ContentRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/ContentRepository.cs @@ -249,7 +249,7 @@ protected override void PersistUpdatedItem(IContent entity) { var publishedState = ((Content) entity).PublishedState; //A new version should only be created if published state (or language) has changed - bool shouldCreateNewVersion = (((ICanBeDirty)entity).IsPropertyDirty("Published") && publishedState != PublishedState.Unpublished) || ((ICanBeDirty)entity).IsPropertyDirty("Language"); + bool shouldCreateNewVersion = ((Content)entity).Published || ((ICanBeDirty)entity).IsPropertyDirty("Language"); if (shouldCreateNewVersion) { //Updates Modified date and Version Guid