Can add category with duplicate name to Root category

Found in

EPiServer.CMS.Core 11.5.2

Fixed in

EPiServer.CMS.Core 11.8.1

Created

Apr 18, 2018

Updated

Jun 27, 2018

Area

CMS Core

State

Closed, Fixed and tested


Description

Steps to reproduce

1. Install Alloy template site (CMS 11.5.2).
2. Build and run the site to make sure Alloy content is imported.
3. Add the attached code file into the solution and then build.

Expected:
Episerver should not allow a duplicate category name to be added to the database.

Actual:
Check tblCategory table. You see a duplicate category name.

If duplicate category names exist, pages using that category break, and the editor can neither open nor edit the page.