Try our conversational search powered by Generative AI!

Henrik Fransas
May 29, 2015
  5685
(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
Optimizely Forms: Safeguarding Your Data

With the rise of cyber threats and privacy concerns, safeguarding sensitive information has become a top priority for businesses across all...

K Khan | May 16, 2024

The Experimentation Process

This blog is part of the series -   Unlocking the Power of Experimentation: A Marketer's Insight. Welcome back, to another insightful journey into...

Holly Quilter | May 16, 2024

Azure AI Language – Sentiment Analysis in Optimizely CMS

In the following article, I showcase how sentiment analysis, which is part of the Azure AI Language service, can be used to detect the sentiment of...

Anil Patel | May 15, 2024 | Syndicated blog

Optimizely Data Platform Visitor Groups now supports multiple instances

The module V2.0 now supports multiple Optimizely Data Platform instances, allowing personalized content based on real-time segments and profile dat...

Andrew Markham | May 15, 2024 | Syndicated blog