WordPress.org

Ready to get started?Download WordPress

Forums

Jetpack by WordPress.com
[resolved] Jetpack causes Javascript errors on mobile browsers (4 posts)

  1. gavsiu
    Member
    Posted 2 years ago #

    I have jQuery and Javascript on my website and Jetpack breaks my webpage when I have Gravatar Hovercards enabled.

    Also stats seems to throw a Javascript error.

    Chrome remote debugging shows this:

    http://domain.com/:35GET http://s.gravatar.com/js/gprofiles.js?aa&ver=3.4.1
    http://domain.com/:143Uncaught ReferenceError: st_go is not defined
    (anonymous function)http://domain.com/:143
    wpgroho.js:27Uncaught ReferenceError: Gravatar is not defined
    (anonymous function)wpgroho.js:27
    f.Callbacks.ojquery.min.js:2
    f.Callbacks.p.fireWithjquery.min.js:2
    e.extend.readyjquery.min.js:2
    c.addEventListener.Bjquery.min.js:2
    http://domain.com/:35GET http://stats.wordpress.com/e-201230.js

    No Javascript errors on desktop Chrome.

    http://wordpress.org/extend/plugins/jetpack/

  2. Tim Moore
    Moderator
    Plugin Author

    Posted 1 year ago #

    Are you using the wp_enqueue_script function to properly add jQuery to your site? If not, that might be what is causing the error.

  3. studioactiv8
    Member
    Posted 1 year ago #

    I am getting these errors too:

    TypeError: 'undefined' is not a function (evaluating 'jQuery('body').on')
    gprofiles.js:2

    TypeError: 'undefined' is not a function (evaluating '$(document).on')
    admin-bar-rest.js:23

  4. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    @studioactiv8 This is mostly likely caused by some issues with your theme or one of your plugins.

    If you use an old version of jQuery instead of using the version that comes bundled with WordPress, you might experience a lot of issues with WordPress and with other plugins like Jetpack. You can read more about it here:
    http://wordpress.org/support/topic/troubleshooting-wordpress-35-master-list?replies=4#post-3547424

    Try switching to a different theme for a few minutes, and check if that solves the issue; if it does, you'll want to look for the function loading jQuery in your theme's header.php file, or in the functions.php file. Once you find that function, you can remove it and enqueue the proper version of jQuery as explained here:
    http://codex.wordpress.org/Function_Reference/wp_enqueue_script

    If the issue is not related to your theme, please try to disable all your plugins, one at a time, until you find the one that causes the conflict. You can then enqueue jQuery using the method I linked to above.

    If you do not feel comfortable editing PHP files, you can also contact the theme or plugin author and ask them to solve the issue.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic