WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Google libraries not loaded

[Resolved] Google libraries not loaded

  • I get these messages:

    [22-Dec-2012 22:51:59 UTC] Use Google Libraries: Google servers do not seem to be hosting requested version of jquery (version 1.8.3). Using version provided by WordPress.
    [22-Dec-2012 22:51:59 UTC] Use Google Libraries: Google servers do not seem to be hosting requested version of jquery-ui-core (version 1.9.2). Using version provided by WordPress.
    [22-Dec-2012 22:55:36 UTC] Use Google Libraries: Google servers not hosting combined library for jquery-ui-widget (version 1.9.2). Using version provided by WordPress to ensure compatability.

    I have this in functions.php:

    function my_scripts() {
    
    	wp_register_script('sds',
    		get_template_directory_uri() . '/js/jquery.smoothDivScroll-1.1.js',
    		array('jquery-ui-widget'),
    		null,
    		true);
    	wp_enqueue_script('sds');
    
    add_action('wp_enqueue_scripts', 'my_scripts');

    I also have
    Use Google Libraries: Another plugin has registered or enqued a script before the "init" action. Attempting to work around it.
    by having WooCommerce as only additional active plug-in.

    Any idea why UGL is not loading Google libraries?

    http://wordpress.org/extend/plugins/use-google-libraries/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Jason Penney
    Member

    @jczorkmid

    The first message is saying that when UGL tried to verify that Google was hosting the versions of the libraries requested it didn’t find them, so it’s using the WordPress supplied versions rather that break your site. It’s by design, <b>but</b> Google does have that version of jQuery, so I’m not sure why it can’t find it.

    Your functions.php looks correct to me.

    Can you temporarily disable WooCommerce and see if the other message goes away?

    I disabled WooCommerce. Apart from UGL I’ve got only my site plug-in where I offloaded some code from functions.php, without which my site won’t work. I don’t get the above messages any more but I do get (as before) this init notice after activating UGL:

    Use Google Libraries: Another plugin has registered or enqued a script before the "init" action. Attempting to work around it.

    My pages never seem to load jQuery from Google though as I understand it from this <header> line:

    <script src="http://local.wp.dev/wp-includes/js/jquery/jquery.js?ver=1.8.3" type="text/javascript"></script>

    I just noticed that UGL works on the production server, but not on the local dev server.

    I do however get this in the production server debug.log:

    Use Google Libraries: WordPress appears to be requesting a non-standard version of swfobject (version 2.2-20120417). Using version provided by WordPress to ensure compatability.

    Plugin Author Jason Penney
    Member

    @jczorkmid

    I have no idea why you would see a difference local vs. production. I develop on a local server. Do you have the exact same plugins/versions/theme/etc?

    You should get that message. WordPress 3.5 is requesting a non-standard version of swfobject, and UGL is just letting you know that’s why it’s not handling swfobject.

    Thank you Jason. We occasionally migrate the production site to local and after that we still get the same notices. Still, it’s useful to know that it can work locally too.

    I tried it on a new installation and get the same notices.

    Plugin Author Jason Penney
    Member

    @jczorkmid

    The non-standard version notice? You will always get that with WordPress 3.5 because WordPress 3.5 is using a non-standard version. It’s just informational, not an error.

    No, I mean the jQuery ones.

    Plugin Author Jason Penney
    Member

    @jczorkmid

    Ah, I see.

    At this point it seems that on your local server UGL is unable to validate the Google URLS when using the WordPress HTTP API. If the server can’t access those URLS, it can’t verify Google’s servers are offering the requested versions, so UGL falls back to the built-in versions. Maybe check your webserver logs on your local server.

    This problem has gone away for unknown reason.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Resolved] Google libraries not loaded’ is closed to new replies.