From 3a39728803830c06e4947acb2066dfa1ae1c16f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Fri, 9 May 2025 10:23:19 +0200 Subject: [PATCH] hotfix: #19230 (#19285) Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../document-publishing.workspace-context.ts | 2 +- .../workspace/document-workspace.context.ts | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/publishing/workspace-context/document-publishing.workspace-context.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/publishing/workspace-context/document-publishing.workspace-context.ts index 6894cac5f2..9151ddbd26 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/publishing/workspace-context/document-publishing.workspace-context.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/publishing/workspace-context/document-publishing.workspace-context.ts @@ -284,7 +284,7 @@ export class UmbDocumentPublishingWorkspaceContext extends UmbContextBase { if (!entityType) throw new Error('Entity type is missing'); // TODO: remove meta - new UmbUnpublishDocumentEntityAction(this, { unique, entityType, meta: {} as never }).execute(); + await new UmbUnpublishDocumentEntityAction(this, { unique, entityType, meta: {} as never }).execute(); } async #handleSaveAndPublish() { diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/document-workspace.context.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/document-workspace.context.ts index 74034de7aa..b783e0a17c 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/document-workspace.context.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/document-workspace.context.ts @@ -301,7 +301,7 @@ export class UmbDocumentWorkspaceContext } public async saveAndPreview(): Promise { - return this.#handleSaveAndPreview(); + return await this.#handleSaveAndPreview(); } async #handleSaveAndPreview() { @@ -351,7 +351,7 @@ export class UmbDocumentWorkspaceContext solution: 'Use the Publish method on the UMB_DOCUMENT_PUBLISHING_WORKSPACE_CONTEXT instead.', }).warn(); if (!this.#publishingContext) throw new Error('Publishing context is missing'); - this.#publishingContext.publish(); + await this.#publishingContext.publish(); } /** @@ -365,7 +365,7 @@ export class UmbDocumentWorkspaceContext solution: 'Use the SaveAndPublish method on the UMB_DOCUMENT_PUBLISHING_WORKSPACE_CONTEXT instead.', }).warn(); if (!this.#publishingContext) throw new Error('Publishing context is missing'); - this.#publishingContext.saveAndPublish(); + await this.#publishingContext.saveAndPublish(); } /** @@ -379,7 +379,7 @@ export class UmbDocumentWorkspaceContext solution: 'Use the Schedule method on the UMB_DOCUMENT_PUBLISHING_WORKSPACE_CONTEXT instead.', }).warn(); if (!this.#publishingContext) throw new Error('Publishing context is missing'); - this.#publishingContext.schedule(); + await this.#publishingContext.schedule(); } /** @@ -393,7 +393,7 @@ export class UmbDocumentWorkspaceContext solution: 'Use the Unpublish method on the UMB_DOCUMENT_PUBLISHING_WORKSPACE_CONTEXT instead.', }).warn(); if (!this.#publishingContext) throw new Error('Publishing context is missing'); - this.#publishingContext.unpublish(); + await this.#publishingContext.unpublish(); } /** @@ -407,7 +407,7 @@ export class UmbDocumentWorkspaceContext solution: 'Use the PublishWithDescendants method on the UMB_DOCUMENT_PUBLISHING_WORKSPACE_CONTEXT instead.', }).warn(); if (!this.#publishingContext) throw new Error('Publishing context is missing'); - this.#publishingContext.publishWithDescendants(); + await this.#publishingContext.publishWithDescendants(); } public createPropertyDatasetContext(