Site root shortcut settings destroys commerce routing

Vote:
 

Hi,

I have just discovered that if you set a shortcut of the startpage of the cms site, commerce product detail pages do no longer work. It looks like a routing issue where it tries to route to the target of the shortcut instead of the actual product. I have observed this by enabling debug logs in EPiServer. Viewing the products in EPiServers edit mode still works, for both forms and on-page editing.

Example:

Root 

  Site (Start page - the site root - shortcut to SubPage)

    SubPage

The above prevents product detail pages from being shown.

I would say this is a bug, but can anybody think of a workaround to this so I can get it to work?

#122985
Jun 22, 2015 12:16
Vote:
 

MapDefaultHierarchialRouter need a root page to work, which is registered by CatalogRouteHelper. By default, the "root" page of CatalogRootHelper is the start page. So if you set up the short cut to SubPage, you have to speficify new root page - i.e., you need to change from this:

CatalogRouteHelper.MapDefaultHierarchialRouter(RouteTable.Routes, false);

to this:

CatalogRouteHelper.MapDefaultHierarchialRouter(RouteTable.Routes, () => new ContentReference(7), false); //ContentLink of subpage.

I would say this is not a bug, but as design.

Regards.

/Q

#122991
Jun 22, 2015 16:00
Vote:
 

Hi Quan,

I am not sure I agree with that, it already got a root page, namely the startpage in my case. That the startpage redirects to another page shouldn't affect the commerce routing. This basically has the effect that normal editors who use the standard functionality in EPiServer can change how the routing works(and break it if they remove the shortcut) for the commerce part, very bad imho. Also this affects the url of the products, so it will become http://somesite/page-that-was-shortcut-to/catalogname/category/product.

it was accepted yesterday as a bug by support.

#123026
Jun 23, 2015 10:05
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.