Merge pull request #2884 from AliSheikhTaheri/temp-u4-8310
Temp u4 8310 - Fixed can't rename of a document type alias by changing its casing
This commit is contained in:
@@ -480,6 +480,7 @@
|
||||
<key alias="currentListViewDesc" version="7.2">The active list view data type</key>
|
||||
<key alias="createListView" version="7.2">Create custom list view</key>
|
||||
<key alias="removeListView" version="7.2">Remove custom list view</key>
|
||||
<key alias="aliasAlreadyExists">A content type, media type or member type with this alias already exists</key>
|
||||
</area>
|
||||
<area alias="renamecontainer">
|
||||
<key alias="renamed">Renamed</key>
|
||||
|
||||
@@ -480,6 +480,7 @@
|
||||
<key alias="currentListViewDesc" version="7.2">The active list view data type</key>
|
||||
<key alias="createListView" version="7.2">Create custom list view</key>
|
||||
<key alias="removeListView" version="7.2">Remove custom list view</key>
|
||||
<key alias="aliasAlreadyExists">A content type, media type or member type with this alias already exists</key>
|
||||
</area>
|
||||
<area alias="renamecontainer">
|
||||
<key alias="renamed">Renamed</key>
|
||||
|
||||
@@ -227,9 +227,9 @@ namespace Umbraco.Web.Editors
|
||||
// works since that is based on aliases.
|
||||
var allAliases = Services.ContentTypeService.GetAllContentTypeAliases();
|
||||
var exists = allAliases.InvariantContains(contentTypeSave.Alias);
|
||||
if ((exists) && (ctId == 0 || ct.Alias != contentTypeSave.Alias))
|
||||
if (exists && (ctId == 0 || ct.Alias.InvariantEquals(contentTypeSave.Alias) == false))
|
||||
{
|
||||
ModelState.AddModelError("Alias", "A content type, media type or member type with this alias already exists");
|
||||
ModelState.AddModelError("Alias", Services.TextService.Localize("editcontenttype/aliasAlreadyExists"));
|
||||
}
|
||||
|
||||
//now let the external validators execute
|
||||
|
||||
Reference in New Issue
Block a user