In my project there are two sites and each uses its own catalog. Category with same name can be in both catalog. When I am trying to add Category with IContentRepository it is giving me exception that Category with same Url name already exists. I found that there is flag named episerver:commerce.UseLessStrictEntryUriSegmentValidation" that I can turn on in App.Settings, but I am getting same exception. Am I doing something wrong?
Hi, while reading this blog post, I realize that this validation only happens on publishing and as you are adding that via code that may not work.
That setting affects at code level, but as the name might suggest, it only affects the entries, not the categories. I will look into that to see if we can lift the restriction, but that'll take time.
When I looked more into this, we have allowed this since Commerce 10.4, for example in Quicksilver I can do this
Note that both categories have mens-shoes as uri segment.
Perhaps that you have custom implementation of HierarchicalCatalogPartialRouter ?
For future visitors, there was a bugfix in 13.29 (COM-10258) which allows you to have two categories in two different parent categories with same uri-segment