diff --git a/src/Umbraco.Web/Editors/ContentController.cs b/src/Umbraco.Web/Editors/ContentController.cs index 71772bd9c5..12047b628b 100644 --- a/src/Umbraco.Web/Editors/ContentController.cs +++ b/src/Umbraco.Web/Editors/ContentController.cs @@ -1201,6 +1201,10 @@ namespace Umbraco.Web.Editors variant.Publish = false; } + //At this stage all variants might have failed validation which means there are no cultures flagged for publishing! + var culturesToPublish = cultureVariants.Where(x => x.Publish).Select(x => x.Culture).ToArray(); + canPublish = canPublish && culturesToPublish.Length > 0; + if (canPublish) { //try to publish all the values on the model - this will generally only fail if someone is tampering with the request @@ -1210,8 +1214,6 @@ namespace Umbraco.Web.Editors if (canPublish) { - var culturesToPublish = cultureVariants.Where(x => x.Publish).Select(x => x.Culture).ToArray(); - //proceed to publish if all validation still succeeds var publishStatus = Services.ContentService.SaveAndPublish(contentItem.PersistedContent, culturesToPublish, Security.CurrentUser.Id); wasCancelled = publishStatus.Result == PublishResultType.FailedPublishCancelledByEvent;