We are currently using Episerver commerce with a category url structure where some subcategories have equal names across different parent categories, however there are never duplicates under the same category.
Every day we sync products from a PIM using the Episerver Service API. What happens is that when two products belonging to /men/shoes and /women/shoes, respectively, is imported, a postfix is appended to one of the shoe-categories and appears like /women/shoes-53451. Where 53451 is some random string. The result after an import job (using the Service API) is completed could be something like:
This means that one of the categories maintains its original uri segment while the other one receives a random postfix.
However, this only happens when using the Service API and not when the category or contained products are changed through the editor page. We have set episerver:commerce.UseLessStrictEntryUriSegmentValidation to true.
In addition we have implemented our own catalog content router by registering a custom HierarchicalCatalogPartialRouter class where we have overriden the GetVirtualPath-method and nothing else. (Not sure if this is relevant)
It there anything we can do to prevent this? We are unable to look into the Service API code which is making it a hard issue to debug.
This appeared to be a bug, solved in EPiServer.Commerce 13.12.0.