PageRouteHelper getting the start page on publish event



I have the below code in my model to get the current page instance, it works fine on view of the page but on click of the publish button it returns the Site start page (which is causing the subsequent logic to fail.) 

var currentPage = ServiceLocator.Current.GetInstance().Page;

NOTE : There are no logic on the publish event in the init module.

Any ideas why it would behavior like this? 

Apr 19, 2016 17:42

As you mention "model" I guess you're using MVC? In that case the model is usually populated with the current page from the Controller, not containing any logic itself to determine the current page.

Could you give some more information about what you're trying to do and what your setup is?

Apr 19, 2016 18:46
* 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.