From b4fd2f6d46ea63f5ee857cef9d626c509f620099 Mon Sep 17 00:00:00 2001 From: Morten Christensen Date: Mon, 29 Apr 2013 07:09:23 -0200 Subject: [PATCH] Fixing oversight in SaveAndPublish method - content might not have an Id yet, so take that into account. --- src/Umbraco.Core/Services/ContentService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Core/Services/ContentService.cs b/src/Umbraco.Core/Services/ContentService.cs index 86a176ee19..69f30554eb 100644 --- a/src/Umbraco.Core/Services/ContentService.cs +++ b/src/Umbraco.Core/Services/ContentService.cs @@ -1365,7 +1365,7 @@ namespace Umbraco.Core.Services using (new WriteLock(Locker)) { //Has this content item previously been published? If so, we don't need to refresh the children - var previouslyPublished = HasPublishedVersion(content.Id); + var previouslyPublished = content.HasIdentity && HasPublishedVersion(content.Id); //content might not have an id var publishStatus = new PublishStatus(content, PublishStatusType.Success); //initially set to success //Check if parent is published (although not if its a root node) - if parent isn't published this Content cannot be published @@ -1379,7 +1379,7 @@ namespace Umbraco.Core.Services } //Content contains invalid property values and can therefore not be published - fire event? - if (!content.IsValid()) + if (content.IsValid() == false) { LogHelper.Info( string.Format(