Since we updated to 11.20.1 the UrlResolver will always resolve shortcuts.
For example, see the result above the variable where the ancestor page that we are trying to lookup has the URL /pageurl
var ancestor = whateverIcontent; // url:/pageurl
if (ancestor is PageData pageData && pageData.LinkType == PageShortcutType.Shortcut)
var asd1 = UrlResolver.Current.GetUrl(pageData);
var asd2 = UrlResolver.Current.GetUrl(pageData.ParentLink);
var asd3 = UrlResolver.Current.GetUrl(pageData.LinkURL);
var asd4 = UrlResolver.Current.GetVirtualPath(pageData);
var asd5 = UrlResolver.Current.GetVirtualPath(pageData.ParentLink);
var asd6 = UrlResolver.Current.GetVirtualPath(pageData.ContentLink);
If I'd like to resolve the url to the page at /pageurl that would be impossible using the UrlResolver. We made the update from 11.13.2 to 11.20.1, did I miss the release notes on that API change?
I believe such thing is not intended, most likely an unwanted side effect of the url-caching thing. I will ask CMS Core team to look into this and get back to you.
The release note: https://world.episerver.com/documentation/Release-Notes/ReleaseNote/?releaseNoteId=CMS-14788
Part of release 339: https://world.episerver.com/releases/episerver---update-339/
I'm interested to know why you want to resolve the URL to a page that has a shortcut?