From c37777b289b6f243e50ea6f68bd8cddda8a030b0 Mon Sep 17 00:00:00 2001 From: Morten Christensen Date: Fri, 28 Nov 2014 13:11:11 +0100 Subject: [PATCH] It should not be possible for a ContentType to add itself as a composition --- src/Umbraco.Core/Models/ContentTypeCompositionBase.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Umbraco.Core/Models/ContentTypeCompositionBase.cs b/src/Umbraco.Core/Models/ContentTypeCompositionBase.cs index 3bebb59959..cb10b8cca6 100644 --- a/src/Umbraco.Core/Models/ContentTypeCompositionBase.cs +++ b/src/Umbraco.Core/Models/ContentTypeCompositionBase.cs @@ -76,6 +76,9 @@ namespace Umbraco.Core.Models if (contentType.ContentTypeComposition.Any(x => x.CompositionAliases().Any(ContentTypeCompositionExists))) return false; + if (Alias.Equals(contentType.Alias)) + return false; + if (ContentTypeCompositionExists(contentType.Alias) == false) { //Before we actually go ahead and add the ContentType as a Composition we ensure that we don't