A breaking change in EPiServer 8 that are not on the list
EPiServer has defined all the breaking changes for EPiServer 8 on this page:
http://world.episerver.com/documentation/Items/Upgrading/EPiServer-CMS/8/Breaking-changes/
There are one change that effected me and that was not on the list and it is for the function GetVirtualPath of UrlResolver.
In EPiServer 7.5 GetVirtualPath returns a string directly but in EPiServer 8 it returns System.Web.Routing.VirtualPathData
Actually GetVirualPath were marked as obsolete in 7.5 so you could think that it would be removed in EPiServer 8 but it is not and another big differens is that if you have a contentreference that has the url "section/subsection/pagename" GetVirtualPath([ContentRef]).VirtualPath will return "section/subsection/pagename". In 7.5 GetVirtualPath for the same content returned "/section/subsection/pagename".
The way to solve this is to do as EPiServer told as in 7.5 and that is to change from GetVirtualPath() to GetUrl() and all will work (and it returns a "/" url for the content)
Just thought I should share this with you, since it caused me some headache and took some time to find (the thing with "section" instead of "/section" url)
Comments