WordPress.org

Ready to get started?Download WordPress

Forums

Use Google Libraries
[resolved] Google libraries not loaded (11 posts)

  1. serons
    Member
    Posted 1 year ago #

    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/

  2. Jason Penney
    Member
    Plugin Author

    Posted 1 year ago #

    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?

  3. serons
    Member
    Posted 1 year ago #

    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>

  4. serons
    Member
    Posted 1 year ago #

    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.

  5. Jason Penney
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  6. serons
    Member
    Posted 1 year ago #

    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.

  7. serons
    Member
    Posted 1 year ago #

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

  8. Jason Penney
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  9. serons
    Member
    Posted 1 year ago #

    No, I mean the jQuery ones.

  10. Jason Penney
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  11. serons
    Member
    Posted 1 year ago #

    This problem has gone away for unknown reason.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.