From 7386afcce6790696df514b4e7f7b1a54b7ee45b0 Mon Sep 17 00:00:00 2001 From: Per Ploug Date: Wed, 13 Jan 2016 14:39:00 +0100 Subject: [PATCH] Doctype alias validation always fails As it only checks if there is a doctype with the same alias, but does not test if this doctype is the same as the one currently being saved. --- src/Umbraco.Web/Editors/ContentTypeControllerBase.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web/Editors/ContentTypeControllerBase.cs b/src/Umbraco.Web/Editors/ContentTypeControllerBase.cs index 753e882772..247bf5bb0b 100644 --- a/src/Umbraco.Web/Editors/ContentTypeControllerBase.cs +++ b/src/Umbraco.Web/Editors/ContentTypeControllerBase.cs @@ -191,7 +191,7 @@ namespace Umbraco.Web.Editors //Validate that there's no other ct with the same name var exists = getContentTypeByAlias(contentTypeSave.Alias); - if (exists != null) + if (exists != null && exists.Id != ctId) { ModelState.AddModelError("Alias", "A content type with this alias already exists"); }