Updated to 1.8 and deployed on Azure: Having jquery load problems

Topics: Administration, Customizing Orchard, Troubleshooting
Apr 11, 2014 at 8:33 PM
Edited Apr 11, 2014 at 8:43 PM
I have a site here that I am working getting migrated over to 1.8.

I am in the process of rebuilding the navigation (this was a custom site originally built in 1.3)

This page has jquery in 3 locations on this page: Nav, nivo.slider and news ticker. When I am logged into the site (Orchard) the navigation and news ticker work fine, the slider partially works. But, when I log out, they do not work.

There are other pages that have jquery 'popovers' that work when you are logged out but not when you are logged in (click on a video on this page). (note: I just tested this behavior on the live site and the jquery does not load there when logged in either. So, this part is ok. none of the jquery and some of the css doesn't load when logged in.)

I am suspect that there is some sort of setting on the Azure Portal Admin about "Don't authenticate for static content", but I can't find anything about it. And, I don't know if I need to set up the jquery any differently in the Views>Layout.cshtml file.

Here is how the site is currently working on Orchard 1.3. You can see how the nivo slider works and the ticker. http://software.homeaway.com/vacation-rentals

Let me know if you have any ideas. This is very frustrating.
May 2, 2014 at 6:53 PM
I would just like to add, that I solved the jquery load problems. The solution is to add this to my Theme Layout.cshtml file:


I added it to the top within this code at the top:

@using (Script.Head()) {

The problem was that the needed jquery was not loading soon enough therefore the items that needed jQuery 1.9.1 weren't getting it loaded soon enough.

I'm not sure why things partially worked when I was logged in. Maybe because there was some scripts that load as https.

By default, Orchard loads the jQuery last.

I hope that helps someone else that may be having jQuery issues and will help you solve your problems faster.