I am trying to add a New Site Module to the Website, and it is working fine for the first time. But when I try to create a second Module and try to add it, it is giving me error. Please see below the steps, and let me know if what I am doing wrong.
For 1st Site Module, say Top Navigation
- I added a Site Module in system\settings\Feature\Tenant. I selected Site Module Option in the Wizard. It runs fine.
- I Cloned a Rendering say Page Content and added that to the Top Navigation Module. For Rendering Parameters & Datasource, I created a copy, and View I used the Original one. It also gets created fine.
- I went to the Site Node, and from Scripts, I selected Add Site Module Option. In the Wizard, the new Module is coming up, and installed that. For this time, it also gets installed fine.
Now, I created a second Site Module say Left Navigation. I followed the above steps for this one as well.
- I added a Site Module in system\settings\Feature\Tenant. I selected Site Module Option in the Wizard. It runs fine.
- I Cloned a Rendering say Page Content and added that to the Left Navigation Module. For Rendering Parameters & Datasource, I created a copy, and View I used the Original one. It also gets created fine.
- I went to the Site Node, and from Scripts, I selected Add Site Module Option. In the Wizard, the new Module is coming up, and installed that. However this time, it is giving error.
Please see the error below.
ManagedPoolThread #9 08:35:20 INFO Executing a script in ScriptSession '$scriptSession$|hose22nrougvl4sgzyemmd1l|68b3421b-11fb-4a3e-a3a6-4388bbe85d19'.
ManagedPoolThread #9 08:35:25 ERROR Error while executing NewItem(string path='master:\content\Tenant\Site', string itemTypeName='/sitecore/templates/Branches/Feature/Tenant/Left Navigation/Available Left Navigation Renderings', string newItemValue='')
Exception: Sitecore.Exceptions.DuplicateItemNameException
Message: The item name "Site" is already defined on this level.
Source: Sitecore.Kernel
at Sitecore.Data.Items.ItemUtil.AssertDuplicateItemName(Item destinationItem, Item sourceItem, String name)
at Sitecore.Data.Items.ItemUtil.AssertItemName(Item destinationItem, Item sourceItem, String name)
at Sitecore.Data.Items.Item.Add(String name, BranchId branchId)
at Spe.Core.Provider.PsSitecoreItemProvider.NewItem(String path, String itemTypeName, Object newItemValue)
ManagedPoolThread #9 08:35:25 ERROR An error occured while processing /sitecore/system/Settings/Feature/Tenant/Left Navigation/Left Navigation Site Setup/Add Available Renderings action
ManagedPoolThread #9 08:35:25 ERROR The item name "Site" is already defined on this level.
I am using Sitecore 9.3 with SXA 9.3. Any leads will be very helpful.
I checked further, and found out that the above works fine on a Single Site Setup. It is giving issue when I have two sites in a Tenant.