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.
Change "Name in URL" (RouteSegment) for Fashion Node and publish so you have min. two content version with different "Name in URL" (RouteSegment).
Retrieve all content version of Fashion Node and use EPiServer.Web.Routing.UrlResolver.GetUrl on each.
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.
Hi,
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.
Did the same for CMS content.
The results can be seen here:
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.
https://imgur.com/a/gr0ol53 (buttom image)
A bug or?