Skip to content

Commit 1e66fb6

Browse files
authored
Add a warning to the CreateContentFromBlueprint method xml docs (#19542)
Add a remark to `ContentService.CreateContentFromBlueprint`
1 parent b348b84 commit 1e66fb6

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/Umbraco.Core/Services/ContentService.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3627,6 +3627,7 @@ public void DeleteBlueprint(IContent content, int userId = Constants.Security.Su
36273627

36283628
private static readonly string?[] ArrayOfOneNullString = { null };
36293629

3630+
/// <inheritdoc />
36303631
public IContent CreateContentFromBlueprint(IContent blueprint, string name, int userId = Constants.Security.SuperUserId)
36313632
{
36323633
if (blueprint == null)

src/Umbraco.Core/Services/IContentService.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ public interface IContentService : IContentServiceBase<IContent>
5656
/// <summary>
5757
/// Creates a new content item from a blueprint.
5858
/// </summary>
59+
/// <remarks>Warning: If you intend to save the resulting <c>IContent</c> as a content node, you must trigger a
60+
/// <see cref="Notifications.ContentScaffoldedNotification"/> notification to ensure that the block ids are regenerated.
61+
/// Failing to do so could lead to caching issues.</remarks>
5962
IContent CreateContentFromBlueprint(IContent blueprint, string name, int userId = Constants.Security.SuperUserId);
6063

6164
/// <summary>

0 commit comments

Comments
 (0)