I am using the Gravity Forms plugin on my WordPress site. I am serving the page over HTTPS and this is breaking the form.
It looks like the issue is how the site is trying to load jQuery. There are 23 JavaScript errors on the page, which seem to be due to a failed jQuery load "Uncaught ReferenceError: jQuery is not defined"
.
If I go to the page where the source is trying to pull the jQuery file, you’ll see the error:https://code.jquery.com/jquery-1.7.1.min.js?ver=3.4.2
Screenshot of the error:
And this screenshot is the reference in the page source:
So I have been told I’d want to look into that – that’s where the ultimate issue is, but I don’t really know what to do next.
Is it failing because of Gravity Forms, the HTTPS plugin from WordPress, or my SSL certificate?
The
code.jquery.com
domain doesn’t support https. You need to load jQuery either from your own domain or from the Google or Microsoft CDNs instead.To load jQuery from your own domain over https, simply do this:
<?php wp_enqueue_script('jquery'); ?>
To load it from Google’s CDN over https, do this:
Omitting the ‘https’ in the above sample is deliberate; it ensures that jQuery will be loaded over the same protocol as your site, be it HTTP or HTTPS.