From 7b4a82eb8d6cbcdc2899f9c40103b77e34e8422c Mon Sep 17 00:00:00 2001 From: Stephan Date: Tue, 20 Jan 2015 19:57:13 +0100 Subject: [PATCH] U4-6154 - bugfix --- src/Umbraco.Core/Services/ContentService.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Core/Services/ContentService.cs b/src/Umbraco.Core/Services/ContentService.cs index 95ef869d3b..966ae9f0e7 100644 --- a/src/Umbraco.Core/Services/ContentService.cs +++ b/src/Umbraco.Core/Services/ContentService.cs @@ -1686,7 +1686,9 @@ namespace Umbraco.Core.Services /// True if unpublishing succeeded, otherwise False private bool UnPublishDo(IContent content, bool omitCacheRefresh = false, int userId = 0) { - content = GetById(content.Id); // ensure we have the newest version + var newest = GetById(content.Id); // ensure we have the newest version + if (content.Version != newest.Version) // but use the original object if it's already the newest version + content = newest; var published = content.Published ? content : GetPublishedVersion(content.Id); // get the published version if (published == null) return false; // already unpublished