One or more errors occurred. (One or more errors occurred. (Self referencing loop detected for property ‘ContentType’ with type ‘Umbraco.Cms.Core.Models.PublishedContent.PublishedContentType’. Path ‘Properties.contentBlocks.Items[2].Properties.items[0].Properties.items[0].Content.ContentType.PropertyTypes[0]’.))
I have a large site with the above error occurring on a number of nodes. I understand the reason for the error but I can’t seem to find a way to catch it and currently it is preventing certain nodes from being published.
It is understandable that BlockList
content can potentially become self-referencing at some point and so whilst the best efforts of editors can help to avoid this it cannot be guaranteed especially when it occurs at relatively significant depths.
I see here that there is loose attempt to mitigate this issue but it doesn’t seem to prevent it.
I’ve tried adding this config in my composer but it also does not prevent the error:
builder.Services.AddControllers()
.AddJsonOptions(options =>
{
options.JsonSerializerOptions.MaxDepth = 32;
options.JsonSerializerOptions.DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull;
options.JsonSerializerOptions.ReferenceHandler = ReferenceHandler.IgnoreCycles;
});
Has anyone had any success in resolving this?