Try our conversational search powered by Generative AI!

Issue with EPiServer.Web.Routing.UrlResolver.GetUrl for Commerce content versions



When using the EPiServer.Web.Routing.UrlResolver.GetUrl method to get the url of multiple content versions (published and previous published) of the same Commerce content it always return the same url. The url of first content version (content link id and work id) used in EPiServer.Web.Routing.UrlResolver.GetUrl will be the url that is returned from the rest.

This is not an issue with CMS content. Here we get the correct url for each different content version.

I did a test in latest version (Episerver.Commerce 12.16.0) of the Quicksilver demo-site.

  1. Change "Name in URL" (RouteSegment) for Fashion Node and publish so you have min. two content version with different "Name in URL" (RouteSegment).
  2. Retrieve all content version of Fashion Node and use EPiServer.Web.Routing.UrlResolver.GetUrl on each.

Did the same for CMS content.

The results can be seen here: (top image)

As you see in the image then we get the correct url for each version of the CMS content, but for the Commerce content we get the same even though that the RouteSegment is correct and different in each of the content versions.

As mentioned above it is the first content version retrived that decides it. If I recycle the app pool and changes the method to get the content versions in .Reverse() then this is shown. (buttom image)

A bug or?

Edited, Jan 16, 2019 12:34

I have time to look into the ticket today, and I can confirm it's a bug. A fix will be in upcoming version (likely 12.17) 

Jan 25, 2019 11:17

Thanks Quan :)

Jan 31, 2019 8:24

Feb 20, 2019 13:17
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.