U4-2414 - the new Content API doesn't respect UmbracoSettings.EnsureUniqueNaming

Created by Ben Norman 20 Jun 2013, 23:40:31 Updated by Morten Christensen 28 Jun 2013, 11:25:20

You can create a node with the same name as an existing node in the same directory even if UmbracoSettings.EnsureUniqueNaming is set to true. It should add a number to the end of the name if a node already exists.

1 Attachments


Ben Norman 20 Jun 2013, 23:41:04

Is there a quick work around that I can drop in place to get this working?

Sebastiaan Janssen 23 Jun 2013, 13:30:30

Can you provide steps to reproduce please? My steps:

  • Open backoffice
  • Find node with an easy name (in this case About)
  • Create a node in that same tree with the same name (again: About)
  • Verify that (1) is added (yes, it is)

If you can get steps to reproduce we can have a look.

Ben Norman 25 Jun 2013, 06:25:07

Here is a code snippet which produces two nodes that have the same name in the same folder even when the Ensure Unique Naming attribute is set to true

@inherits umbraco.MacroEngines.DynamicNodeContext @using Umbraco.Core.Services

@{ var service = new ContentService(); var entry = service.CreateContent("apples", 1051, "umbTextpage"); service.SaveAndPublish(entry);

var entry2 = service.CreateContent("apples", 1051, "umbTextpage"); service.SaveAndPublish(entry2);


Entry Created: @entry.Id

Entry Created: @entry2.Id


Morten Christensen 28 Jun 2013, 11:25:20

This has been fixed in version 6.0.7

Priority: Normal

Type: Bug

State: Fixed

Assignee: Morten Christensen

Difficulty: Normal


Backwards Compatible: True

Fix Submitted:

Affected versions: 6.1.1, 6.0.6

Due in version: 6.0.7


Story Points: