November Happy Hour will be moved to Thursday December 5th.

Henrik Fransas
May 29, 2015
  5769
(3 votes)

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)

May 29, 2015

Comments

Please login to comment.
Latest blogs
Adding Geolocation Personalisation to Optimizely CMS with Cloudflare

Enhance your Optimizely CMS personalisation by integrating Cloudflare's geolocation headers. Learn how my Cloudflare Geo-location Criteria package...

Andy Blyth | Nov 26, 2024 | Syndicated blog

Optimizely SaaS CMS + Coveo Search Page

Short on time but need a listing feature with filters, pagination, and sorting? Create a fully functional Coveo-powered search page driven by data...

Damian Smutek | Nov 21, 2024 | Syndicated blog

Optimizely SaaS CMS DAM Picker (Interim)

Simplify your Optimizely SaaS CMS workflow with the Interim DAM Picker Chrome extension. Seamlessly integrate your DAM system, streamlining asset...

Andy Blyth | Nov 21, 2024 | Syndicated blog

Optimizely CMS Roadmap

Explore Optimizely CMS's latest roadmap, packed with developer-focused updates. From SaaS speed to Visual Builder enhancements, developer tooling...

Andy Blyth | Nov 21, 2024 | Syndicated blog