diff --git a/src/Umbraco.Core/EmbeddedResources/Lang/da.xml b/src/Umbraco.Core/EmbeddedResources/Lang/da.xml index ceaf24aea8..73ef388cb1 100644 --- a/src/Umbraco.Core/EmbeddedResources/Lang/da.xml +++ b/src/Umbraco.Core/EmbeddedResources/Lang/da.xml @@ -298,9 +298,6 @@ Fjern denne tekstboks Indholdsrod Inkluder ikke-udgivet indhold. - Udgiv uændrede elementer. - ADVARSEL: Udgivelse af alle sider under denne i indholdstræet, uanset om de er ændret eller ej, kan være en ressourcekrævende og langvarig proces. - Dette bør ikke være nødvendigt under normale omstændigheder, så fortsæt kun med denne handling, hvis du er sikker på, at det er nødvendigt. Denne værdi er skjult. Hvis du har brug for adgang til at se denne værdi, bedes du kontakte din administrator. diff --git a/src/Umbraco.Core/EmbeddedResources/Lang/en.xml b/src/Umbraco.Core/EmbeddedResources/Lang/en.xml index a0494a0204..5f48939766 100644 --- a/src/Umbraco.Core/EmbeddedResources/Lang/en.xml +++ b/src/Umbraco.Core/EmbeddedResources/Lang/en.xml @@ -309,9 +309,6 @@ Remove this text box Content root Include unpublished content items. - Publish unchanged items. - WARNING: Publishing all pages below this one in the content tree, whether or not they have changed, can be an expensive and long-running operation. - This should not be necessary in normal circumstances so please only proceed with this option selected if you are certain it is required. This value is hidden. If you need access to view this value please contact your website administrator. diff --git a/src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml b/src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml index 74d87e8979..f86b082513 100644 --- a/src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml +++ b/src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml @@ -308,9 +308,6 @@ Remove this text box Content root Include unpublished content items. - Publish unchanged items. - WARNING: Publishing all pages below this one in the content tree, whether or not they have changed, can be an expensive and long-running operation. - This should not be necessary in normal circumstances so please only proceed with this option selected if you are certain it is required. This value is hidden. If you need access to view this value please contact your website administrator. diff --git a/src/Umbraco.Core/Models/ContentEditing/ContentSaveAction.cs b/src/Umbraco.Core/Models/ContentEditing/ContentSaveAction.cs index 929ee7c097..87d5e7728a 100644 --- a/src/Umbraco.Core/Models/ContentEditing/ContentSaveAction.cs +++ b/src/Umbraco.Core/Models/ContentEditing/ContentSaveAction.cs @@ -59,43 +59,11 @@ public enum ContentSaveAction /// Saves and publishes the content item including all descendants regardless of whether they have a published version /// or not. /// - [Obsolete("This option is no longer used as the 'force' aspect has been extended into options for publishing unpublished and re-publishing changed content. Please use one of those options instead.")] PublishWithDescendantsForce = 10, /// /// Creates and publishes the new content item including all descendants regardless of whether they have a published /// version or not. /// - [Obsolete("This option is no longer used as the 'force' aspect has been extended into options for publishing unpublished and re-publishing changed content. Please use one of those options instead.")] PublishWithDescendantsForceNew = 11, - - /// - /// Saves and publishes the content item including all descendants including publishing previously unpublished content. - /// - PublishWithDescendantsIncludeUnpublished = 12, - - /// - /// Saves and publishes the new content item including all descendants including publishing previously unpublished content. - /// - PublishWithDescendantsIncludeUnpublishedNew = 13, - - /// - /// Saves and publishes the content item including all descendants irrespective of whether there are any pending changes. - /// - PublishWithDescendantsForceRepublish = 14, - - /// - /// Saves and publishes the new content item including all descendants including publishing previously unpublished content. - /// - PublishWithDescendantsForceRepublishNew = 15, - - /// - /// Saves and publishes the content item including all descendants including publishing previously unpublished content and irrespective of whether there are any pending changes. - /// - PublishWithDescendantsIncludeUnpublishedAndForceRepublish = 16, - - /// - /// Saves and publishes the new content item including all descendants including publishing previously unpublished content and irrespective of whether there are any pending changes. - /// - PublishWithDescendantsIncludeUnpublishedAndForceRepublishNew = 17, } diff --git a/src/Umbraco.Web.BackOffice/Controllers/ContentController.cs b/src/Umbraco.Web.BackOffice/Controllers/ContentController.cs index 2f71f5ef3f..79a0ceeecd 100644 --- a/src/Umbraco.Web.BackOffice/Controllers/ContentController.cs +++ b/src/Umbraco.Web.BackOffice/Controllers/ContentController.cs @@ -1007,24 +1007,14 @@ public class ContentController : ContentControllerBase { case ContentSaveAction.Publish: case ContentSaveAction.PublishWithDescendants: -#pragma warning disable CS0618 // Type or member is obsolete case ContentSaveAction.PublishWithDescendantsForce: -#pragma warning restore CS0618 // Type or member is obsolete - case ContentSaveAction.PublishWithDescendantsIncludeUnpublished: - case ContentSaveAction.PublishWithDescendantsForceRepublish: - case ContentSaveAction.PublishWithDescendantsIncludeUnpublishedAndForceRepublish: case ContentSaveAction.SendPublish: case ContentSaveAction.Schedule: contentItem.Action = ContentSaveAction.Save; break; case ContentSaveAction.PublishNew: case ContentSaveAction.PublishWithDescendantsNew: -#pragma warning disable CS0618 // Type or member is obsolete case ContentSaveAction.PublishWithDescendantsForceNew: -#pragma warning restore CS0618 // Type or member is obsolete - case ContentSaveAction.PublishWithDescendantsIncludeUnpublishedNew: - case ContentSaveAction.PublishWithDescendantsForceRepublishNew: - case ContentSaveAction.PublishWithDescendantsIncludeUnpublishedAndForceRepublishNew: case ContentSaveAction.SendPublishNew: case ContentSaveAction.ScheduleNew: contentItem.Action = ContentSaveAction.SaveNew; @@ -1158,16 +1148,8 @@ public class ContentController : ContentControllerBase break; case ContentSaveAction.PublishWithDescendants: case ContentSaveAction.PublishWithDescendantsNew: -#pragma warning disable CS0618 // Type or member is obsolete case ContentSaveAction.PublishWithDescendantsForce: case ContentSaveAction.PublishWithDescendantsForceNew: -#pragma warning restore CS0618 // Type or member is obsolete - case ContentSaveAction.PublishWithDescendantsIncludeUnpublished: - case ContentSaveAction.PublishWithDescendantsIncludeUnpublishedNew: - case ContentSaveAction.PublishWithDescendantsForceRepublish: - case ContentSaveAction.PublishWithDescendantsForceRepublishNew: - case ContentSaveAction.PublishWithDescendantsIncludeUnpublishedAndForceRepublish: - case ContentSaveAction.PublishWithDescendantsIncludeUnpublishedAndForceRepublishNew: { if (!await ValidatePublishBranchPermissionsAsync(contentItem)) { @@ -1238,14 +1220,8 @@ public class ContentController : ContentControllerBase private static PublishBranchFilter BuildPublishBranchFilter(ContentSaveAction contentSaveAction) { - var includeUnpublished = contentSaveAction == ContentSaveAction.PublishWithDescendantsIncludeUnpublished - || contentSaveAction == ContentSaveAction.PublishWithDescendantsIncludeUnpublishedNew - || contentSaveAction == ContentSaveAction.PublishWithDescendantsIncludeUnpublishedAndForceRepublish - || contentSaveAction == ContentSaveAction.PublishWithDescendantsIncludeUnpublishedAndForceRepublishNew; - var forceRepublish = contentSaveAction == ContentSaveAction.PublishWithDescendantsForceRepublish - || contentSaveAction == ContentSaveAction.PublishWithDescendantsForceRepublishNew - || contentSaveAction == ContentSaveAction.PublishWithDescendantsIncludeUnpublishedAndForceRepublish - || contentSaveAction == ContentSaveAction.PublishWithDescendantsIncludeUnpublishedAndForceRepublishNew; + var includeUnpublished = contentSaveAction == ContentSaveAction.PublishWithDescendantsForce + || contentSaveAction == ContentSaveAction.PublishWithDescendantsForceNew; PublishBranchFilter publishBranchFilter = PublishBranchFilter.Default; if (includeUnpublished) @@ -1253,11 +1229,6 @@ public class ContentController : ContentControllerBase publishBranchFilter |= PublishBranchFilter.IncludeUnpublished; } - if (forceRepublish) - { - publishBranchFilter |= PublishBranchFilter.ForceRepublish; - } - return publishBranchFilter; } diff --git a/src/Umbraco.Web.BackOffice/Filters/ContentSaveValidationAttribute.cs b/src/Umbraco.Web.BackOffice/Filters/ContentSaveValidationAttribute.cs index 45948b5960..c75bbd5a80 100644 --- a/src/Umbraco.Web.BackOffice/Filters/ContentSaveValidationAttribute.cs +++ b/src/Umbraco.Web.BackOffice/Filters/ContentSaveValidationAttribute.cs @@ -182,12 +182,7 @@ public sealed class ContentSaveValidationAttribute : TypeFilterAttribute break; case ContentSaveAction.Publish: case ContentSaveAction.PublishWithDescendants: -#pragma warning disable CS0618 // Type or member is obsolete case ContentSaveAction.PublishWithDescendantsForce: -#pragma warning restore CS0618 // Type or member is obsolete - case ContentSaveAction.PublishWithDescendantsIncludeUnpublished: - case ContentSaveAction.PublishWithDescendantsForceRepublish: - case ContentSaveAction.PublishWithDescendantsIncludeUnpublishedAndForceRepublish: permissionToCheck.Add(ActionPublish.ActionLetter); contentToCheck = contentItem.PersistedContent; contentIdToCheck = contentToCheck?.Id ?? default; @@ -237,12 +232,7 @@ public sealed class ContentSaveValidationAttribute : TypeFilterAttribute break; case ContentSaveAction.PublishNew: case ContentSaveAction.PublishWithDescendantsNew: -#pragma warning disable CS0618 // Type or member is obsolete case ContentSaveAction.PublishWithDescendantsForceNew: -#pragma warning restore CS0618 // Type or member is obsolete - case ContentSaveAction.PublishWithDescendantsIncludeUnpublishedNew: - case ContentSaveAction.PublishWithDescendantsForceRepublishNew: - case ContentSaveAction.PublishWithDescendantsIncludeUnpublishedAndForceRepublishNew: //Publish new requires both ActionNew AND ActionPublish // TODO: Shouldn't publish also require ActionUpdate since it will definitely perform an update to publish but maybe that's just implied diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js index 6d5503301b..72c5f3fec1 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js @@ -963,7 +963,7 @@ //we need to return this promise so that the dialog can handle the result and wire up the validation response return performSave({ saveMethod: function (content, create, files, showNotifications) { - return contentResource.publishWithDescendants(content, create, model.includeUnpublished, model.forceRepublish, files, showNotifications); + return contentResource.publishWithDescendants(content, create, model.includeUnpublished, files, showNotifications); }, action: "publishDescendants", showNotifications: false, diff --git a/src/Umbraco.Web.UI.Client/src/common/resources/content.resource.js b/src/Umbraco.Web.UI.Client/src/common/resources/content.resource.js index a86675916f..dab8d8629b 100644 --- a/src/Umbraco.Web.UI.Client/src/common/resources/content.resource.js +++ b/src/Umbraco.Web.UI.Client/src/common/resources/content.resource.js @@ -1003,18 +1003,14 @@ function contentResource($q, $http, umbDataFormatter, umbRequestHelper) { * @returns {Promise} resourcePromise object containing the saved content item. * */ - publishWithDescendants: function (content, isNew, includeUnpublished, forceRepublish, files, showNotifications) { + publishWithDescendants: function (content, isNew, includeUnpublished, files, showNotifications) { var endpoint = umbRequestHelper.getApiUrl( "contentApiBaseUrl", "PostSave"); var action = "publishWithDescendants"; - if (includeUnpublished === true && forceRepublish === true) { - action += "IncludeUnpublishedAndForceRepublish"; - } else if (includeUnpublished === true) { - action += "IncludeUnpublished"; - } else if (forceRepublish === true) { - action += "ForceRepublish"; + if (includeUnpublished === true) { + action += "Force"; } return saveContentItem(content, action + (isNew ? "New" : ""), files, endpoint, showNotifications); diff --git a/src/Umbraco.Web.UI.Client/src/views/content/overlays/publishdescendants.controller.js b/src/Umbraco.Web.UI.Client/src/views/content/overlays/publishdescendants.controller.js index 40e7e2d4ba..ec0074aca0 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/overlays/publishdescendants.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/content/overlays/publishdescendants.controller.js @@ -5,12 +5,10 @@ var vm = this; vm.includeUnpublished = $scope.model.includeUnpublished || false; - vm.forceRepublish = $scope.model.forceRepublish || false; vm.publishAll = false; vm.changeSelection = changeSelection; vm.toggleIncludeUnpublished = toggleIncludeUnpublished; - vm.toggleForceRepublish = toggleForceRepublish; vm.changePublishAllSelection = changePublishAllSelection; function onInit() { @@ -30,11 +28,6 @@ vm.labels.includeUnpublished = value; }); } - if (!vm.labels.forceRepublish) { - localizationService.localize("content_forceRepublish").then(value => { - vm.labels.forceRepublish = value; - }); - } vm.variants.forEach(variant => { variant.isMandatory = isMandatoryFilter(variant); @@ -74,11 +67,6 @@ $scope.model.includeUnpublished = vm.includeUnpublished; } - function toggleForceRepublish() { - vm.forceRepublish = !vm.forceRepublish; - $scope.model.forceRepublish = vm.forceRepublish; - } - /** Returns true if publishing is possible based on if there are un-published mandatory languages */ function canPublish() { var selected = []; diff --git a/src/Umbraco.Web.UI.Client/src/views/content/overlays/publishdescendants.html b/src/Umbraco.Web.UI.Client/src/views/content/overlays/publishdescendants.html index 106f363c71..1e727e71ec 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/overlays/publishdescendants.html +++ b/src/Umbraco.Web.UI.Client/src/views/content/overlays/publishdescendants.html @@ -16,22 +16,6 @@ show-labels="true"> - -
- - -
-
-

-

-
@@ -51,22 +35,6 @@
-
- - -
-
-

-

-
-