Quantcast
Channel: Using Optimizely Platforms
Viewing all articles
Browse latest Browse all 8020

Internal url not mapping correctly when mapped through XHTML field

$
0
0

Hello,

I have a catalog item routed through a custom partial route as "mysite.com/items/itemA". Note that "mysite.com/items" doesn't represent any actual page on my website.

The problem appears when I paste the link "mysite.com/items/itemA" in any XHTML field on CMS. That link will be seen as internal and mapped to the corresponding internal link. I end up with something like "mysite.com/link/<string>.aspx?espremainingpath=items/itemA". Because "/items" does not correpond to any existing page, on GetPartialVirtualPath(), I return the BasePathRoot as the home page and include everything else in the PartialVirtualPath().

return new PartialRouteData
    {
        BasePathRoot = "mysite.com/",
        PartialVirtualPath = string.Format("{0}/{1}", "items", item.name.ToLower())
    };

Unfortunatly when I click on the new generated link it will take me to the home page and will keep the espremainingpath as it is, so I would have something like "mysite.com/?epsremainingpath=items%2FitemA%2F" when the behavior I would be expecting would be for the espremainingpath to be interpreted.

As I can currenctly access any items when edting the url directly I assume that I didn't miss anything when implementing the custom partial route.

Is this an issue with Episerver or am I missing something? Thank you :]

The version of Episerver CMS I am using is 11.11.2 together with c# 7.3


Viewing all articles
Browse latest Browse all 8020

Trending Articles