2

We have deployed our project on Azure Staging CM and CD and everything works fine. We then moved to production instance CM/CD. CM works fine but on CD site freeze on ajax calls and browser prompts to stop running script in jQuery lib (hosted on CDN).

We also noticed that @URL.Action is returning empty string while on CM it is returning an actual URL. Any ideas?

Update Calling hostname/api/sitecore/controller/action on CM throws an exception when trying to access the RenderingContext:

Attempt to retrieve context object of type Sitecore.Mvc.Presentation.RenderingContext from empty stack'

Which means it started executing the action.

However hostname/api/sitecore/controller/action on CD redirects to our page not found page.

So my question is: are there MVC routes differences between CM and CD?

2
  • 2
    This is a pretty broad question, as it stands. You're not giving us much to go on, here. As the question currently reads, this could be a purely JavaScript question that is unrelated to Sitecore. I recommend that you add more detail and either reword your question so that it is Sitecore-specific or else that you instead ask it on StackOverflow. Commented Oct 4, 2017 at 14:59
  • true but I'm not having issues on CM only on CD. URL.Action is returning nothing. It may be something related to sitecore areas and routes that differ between CM and CD
    – TamerM
    Commented Oct 4, 2017 at 15:07

1 Answer 1

1

It turned out to be similar to this SO solution.

The default {controller}/{action} pattern was not found and the sitecore.Speak.Mvc.config (which defines such pattern) gets disabled on CD.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.