Support

Home Forums Event Espresso Premium jquery conflict only on EE pages

jquery conflict only on EE pages

Posted: December 13, 2012 at 11:06 am


tharmon

December 13, 2012 at 11:06 am

I am getting jquery conflict errors but only on EE pages so my required fields are not validating. When I compare the page source between a page with conflicts and an EE page with conflicts, the errors are all occurring when trying to load libraries via https on ee pages instead of http on other pages. I tried switching back to 2011 theme in wordpress and errors still occur, so I am inclined to believe it is not a theme error.

Can someone take a look at help me understand where to look for the conflict or how to resolve.

page with no errors http://www.kcfaa.org
events page with errors https://www.kcfaa.org/event-registration/?ee=2

Any help would be greatly appreciated. Have already upgraded to WP 3.5, EE 3.1.29.1, deactivated MER….the EE events work, but the fields won’t validate to require the addresses.

Thanks


Josh

  • Support Staff

December 13, 2012 at 1:57 pm

Hi there,

The reason this is only happening on Event Espresso pages is because they are the ones being set to load as https.

In the case of jQuery not loading when the page is set to load as https: Since you’ve ruled out the theme, it’s a plugin that is trying to load the jQuery library from the the jQuery.com site. This isn’t a very good practice, since they don’t allow linking to their scripts in this way. You can see this first hand if you try to load the following link in the browser:

https://code.jquery.com/jquery-1.7.2.min.js?ver=3.5

vs

http://code.jquery.com/jquery-1.7.2.min.js?ver=3.5

It would be best to change which ever plugin is doing this so the plugin will loadds the jQuery library directly from the WordPress installation. This way, you’ll always have the latest version too. You may need to deactivate some of the plugins to find which one of them is doing this. It may even be an older plugin that needs to be updated. Most plugin dev stopped liking to code.jquery.com years ago.

If you find the plugin, the code you can change will likely look something like this:

if( !is_admin() ){
          // Load jQuery
            wp_deregister_script( 'jquery' );
            wp_register_script( 'jquery', 'http://code.jquery.com/jquery.1.7.2', false );
        wp_enqueue_script('jquery');
}

What you can do is change it so it reads:

if( !is_admin() ){
          // Load jQuery
        wp_enqueue_script('jquery');
}

The support post ‘jquery conflict only on EE pages’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso