From 0f30ebe5e525d4333cff79f0bc4c6e8b164f40a6 Mon Sep 17 00:00:00 2001
From: Laura Neto <12862535+lauraneto@users.noreply.github.com>
Date: Thu, 12 Jun 2025 15:50:52 +0200
Subject: [PATCH] Add a remark to `ContentService.CreateContentFromBlueprint`
---
src/Umbraco.Core/Services/ContentService.cs | 1 +
src/Umbraco.Core/Services/IContentService.cs | 3 +++
2 files changed, 4 insertions(+)
diff --git a/src/Umbraco.Core/Services/ContentService.cs b/src/Umbraco.Core/Services/ContentService.cs
index 45176629a23a..86c06930bb3b 100644
--- a/src/Umbraco.Core/Services/ContentService.cs
+++ b/src/Umbraco.Core/Services/ContentService.cs
@@ -3627,6 +3627,7 @@ public void DeleteBlueprint(IContent content, int userId = Constants.Security.Su
private static readonly string?[] ArrayOfOneNullString = { null };
+ ///
public IContent CreateContentFromBlueprint(IContent blueprint, string name, int userId = Constants.Security.SuperUserId)
{
if (blueprint == null)
diff --git a/src/Umbraco.Core/Services/IContentService.cs b/src/Umbraco.Core/Services/IContentService.cs
index c7b33589b3e0..8b96cc81df9f 100644
--- a/src/Umbraco.Core/Services/IContentService.cs
+++ b/src/Umbraco.Core/Services/IContentService.cs
@@ -56,6 +56,9 @@ public interface IContentService : IContentServiceBase
///
/// Creates a new content item from a blueprint.
///
+ /// Warning: If you intend to save the resulting IContent as a content node, you must trigger a
+ /// notification to ensure that the block ids are regenerated.
+ /// Failing to do so could lead to caching issues.
IContent CreateContentFromBlueprint(IContent blueprint, string name, int userId = Constants.Security.SuperUserId);
///