If you guys have worked on Sitecore 7.x or 8.x then you will know that there is no restriction for creating item with same name at same level. So similarly I had no idea that it is restricted in the latest versions for Sitecore.
Recently I was trying to install a package created from Sitecore 8.2 on Sitecore 10 and it was throwing error. At the first place I thought there is compatibility issues then I thought over it as I was just installing few media items and content items based on Sample template.
Google is your best colleague when in doubts 😛 I started my R&D to resolve this query and I came to know that in latest version of Sitecore (importantly 9.3 and 10) the duplicate item names are restricted at same level.
I tried it on my Sitecore 10 vanilla instance and got below error:
I thought of finding the setting and allowing it create the duplicate items at same level. The setting name “AllowDuplicateItemNamesOnSameLevel” in Sitecore.config file under App_Config folder. Default it is set to false to restrict the duplication.
I changed the setting to true and tested the package installation and it worked as expected. So in case you are planning for data migration from older Sitecore versions to the latest versions then keep a eye on this setting. You can set it to true for the period of your data migration and revert to false once done so there wont be any impact on the migration.
Thank you.. Keep Learning.. Keep Sitecoring.. 🙂