Catalog import may change URL segment of category

Found in

EPiServer.Commerce 12.0.0

Fixed in

EPiServer.Commerce 13.12.0


Oct 31, 2019


Nov 25, 2019




Closed, Fixed and tested


Steps to reproduce

1. Have a catalog with two categories, C1 and C2, with different parent categories but the same "name in url" (url segment) in a given language, say English. The total number of categories in the catalog should be less than 20.
NOTE1: The bug applies to any catalog size. The small number of categories is to make sure they are imported in the same batch by the import job, which has a batch size of 20.
2. Export the catalog.
3. Change the code field of C1.
NOTE2: Technically, changing the code, name, name in URL or other base/SEO field (but not meta data like display name) of any of the nodes should be sufficient to trigger the bug, but triggering the bug is dependent on the order in which the items are imported. So it is easier to trigger the bug by editing one of the items involved.
4. Import the exported catalog file.

The change is restored but "name in url" of C1 and C2 remain the same.

C1 or C2 gets its "name in url" regenerated based on its name and some random characters.