Skip to content

DuplicateItemName exception #428

@bartlomiejmucha

Description

@bartlomiejmucha

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
Sitecore 10 does not allow having two items with the same name under one parent by default. If we have situation that we have two items with the same name under two different paths, for example:

/sitecore/templates/Foundation/Account/User
/sitecore/templates/Features/Account/User

both under different unicorn configurations.

And if we at some point decide to move second item next to the first item but under different name, so we will have:

/sitecore/templates/Foundation/Account/User
/sitecore/templates/Foundation/Account/User2

we will get DuplicateItemNameException.

I'm guessing that it's probably because unicorn tries to move the item first and then update it's name and this will not work as there is already an item with such name in the second path.

To fix that error we can manually update name of the first item to something else, and then unicorn sync works.

If the current behavior is a bug, please provide the steps to reproduce.

What is the expected behavior?

Not sure if this is possible, but would be good if unicorn could update the path and name of the item in the same time.

Please mention your Sitecore version and Unicorn version.

Sitecore 10.2 initial release; Unicorn 4.1.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions