PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Wrong call to JQuery in ver. 1.6.8.1

  1. Trisha
    Member

    I had a really hard time figuring out why the Ajax confirmation would not work - no spinners, no message - yet the form did indeed submit, just with no visual indication that it did, but I finally pinpointed it to a problem with the latest version that I updated to.

    When the plugin inserts the URL call to the JQuery library, it adds in my domain to the beginning BEFORE the ajax.googleapis.com so JQuery was not being loaded correctly......

    I fixed it by manually added a link to the correct URL in my header.php file, but this should go into the "bugfix" requests for the next version.

    Posted 11 years ago on Tuesday October 23, 2012 | Permalink
  2. Can you share a link to the form where this behavior can be observed, or explain how you were adding jQuery via googleapis? Thank you.

    Posted 11 years ago on Wednesday October 24, 2012 | Permalink
  3. Trisha
    Member

    Hi Chris,

    It is no longer exhibiting the behavior since I manually added the link to JQuery, and it's a live site so I don't want to remove it.....

    I don't know how GF adds the link, but when the plugin is activated, it adds these links to the <head> section:

    <link rel='stylesheet' id='gforms_css-css'  href='http://www.usclassics.com/wp-content/plugins/gravityforms/css/forms.css?ver=1.6.8.1' type='text/css' media='all' />
    
    <script type='text/javascript' src='http://www.usclassics.com//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js?ver=3.4.2'></script>
    
    <script type='text/javascript' src='http://www.usclassics.com/wp-content/plugins/gravityforms/js/jquery.textareaCounter.plugin.js?ver=1.6.8.1'></script>

    As you can see, the middle link refers first to my domain, and adds an extra trailing slash, then refers to the ajax.googleapis.com site to get jquery - so the jquery library is not loading correctly.

    If I knew where this is in the plugin code, I would just fix it myself until a new version comes out.....

    I hope this is helpful, and I really don't mind fixing it myself with a little direction on where to find it....

    Posted 11 years ago on Wednesday October 24, 2012 | Permalink
  4. We don't use the google hosted jQuery library in Gravity Forms. We enqueue the version that ships with WP in the wp-includes/js/ folder. Something else is going on here in your setup - you might want to check for theme/plugin conflicts:

    http://www.gravityhelp.com/documentation/page/Testing_for_a_Theme/Plugin_Conflict

    Posted 11 years ago on Wednesday October 24, 2012 | Permalink
  5. Trisha
    Member

    Thanks Rob...........I had assumed that it was GF because the link appears in between the link to the GF stylesheet and the textarea counter script......but you are correct, it is not GF that is doing that.

    It didn't turn out to be a plugin either, but since you got me thinking I dug into the original theme files and I found it in the functions.php file that came with the theme (it's a starter theme called HTML5 Reset)......it was using wp_register_script to call jquery and had an improperly formed URL there (they left off the http:) - I corrected that and will let the theme developer know.

    So, ummm, nevermind! :-)

    Posted 11 years ago on Wednesday October 24, 2012 | Permalink
  6. Thanks for the update Trisha.

    Posted 11 years ago on Thursday October 25, 2012 | Permalink

This topic has been resolved and has been closed to new replies.