From 201906f662616689c1632cfb0c56dc7e1691808d Mon Sep 17 00:00:00 2001 From: Andy Butland Date: Wed, 22 Oct 2025 13:37:19 +0200 Subject: [PATCH] Populate IncludeDescendants on ContentPublishedNotification when publishing branch (forward port of #20578). --- src/Umbraco.Core/Notifications/ContentPublishedNotification.cs | 1 + src/Umbraco.Core/Services/ContentService.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Core/Notifications/ContentPublishedNotification.cs b/src/Umbraco.Core/Notifications/ContentPublishedNotification.cs index 07baedc473..f242ef20a9 100644 --- a/src/Umbraco.Core/Notifications/ContentPublishedNotification.cs +++ b/src/Umbraco.Core/Notifications/ContentPublishedNotification.cs @@ -24,6 +24,7 @@ public sealed class ContentPublishedNotification : EnumerableObjectNotification< public ContentPublishedNotification(IEnumerable target, EventMessages messages, bool includeDescendants) : base(target, messages) => IncludeDescendants = includeDescendants; + /// /// Gets a enumeration of which are being published. /// diff --git a/src/Umbraco.Core/Services/ContentService.cs b/src/Umbraco.Core/Services/ContentService.cs index 884eac7dd7..eebf54e503 100644 --- a/src/Umbraco.Core/Services/ContentService.cs +++ b/src/Umbraco.Core/Services/ContentService.cs @@ -2214,7 +2214,7 @@ public class ContentService : RepositoryService, IContentService variesByCulture ? culturesPublished.IsCollectionEmpty() ? null : culturesPublished : ["*"], null, eventMessages)); - scope.Notifications.Publish(new ContentPublishedNotification(publishedDocuments, eventMessages).WithState(notificationState)); + scope.Notifications.Publish(new ContentPublishedNotification(publishedDocuments, eventMessages, true).WithState(notificationState)); scope.Complete(); }