Support

Home Forums Calendar calendar not showing up after updating Jquery

calendar not showing up after updating Jquery

Posted: April 11, 2013 at 2:03 pm

Viewing 3 reply threads


Dale Harrison

    April 11, 2013 at 2:03 pm

    Hi there,

    We updated the jQuery library that was calling an outdated version in our theme. The calendar was working for a while after this update, and now is suddenly not working again. When you click on the link to our calendar, the page appears blank. Can you take a look and give me some direction as to why this is not functioning now.

     

    Thanks

    Suzanne


    Jonathan Wilson

    • Support Staff

    April 11, 2013 at 2:13 pm

    Hi Dale,

    Your theme is still using an outdated version of jQuery (1.6.1). We recommend using what is automatically included in WordPress (currently 1.8.3).

    When working with a few of our customers, I’ve noticed something like this in the theme’s functions.php:

    function super_cool_theme_js() {
    if (is_admin()) return;
    wp_deregister_script( 'jquery' );
    wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js');
    wp_enqueue_script( 'jquery' );
    }

    While the intentions here may be good (loading up jQuery from Google’s CDN can make the site load faster), this can create problems down the road if the theme does not get updated. jQuery is a very active project, and updates are released at a fairly rapid pace.
    Since WordPress will continue to update the version of jQuery that it bundles, by running this version you’ll get the benefit of the latest features and bug fixes of the current version. This also avoids compatibility issues, as most plugin authors are developing and testing with the version of jQuery that is bundled with WordPress.
    One possible way to fix the above example would be to remove the lines of code that swap out the bundled version of jQuery, leaving:

    wp_enqueue_script( 'jquery' );

    Note that there are many different ways to include jQuery, so the way to fix this might be a little different with your specific theme.


    Dale Harrison

      April 16, 2013 at 12:10 pm

      Hi, since your last email, we did update to Verion 1.8.3 version  of Jquery and that caused the URL not to function properly. The site would not appear when you placed a www. in front of the URL, however, the calendar was working.

      Now we used  JQuery updater to update to the most recent version of JQuery 1.9.1 and the calendar is not working again, but the URL issue is fixed that was causing issues to the ht access.

       

      Please advise, I can have pasted the original reference to 1.8.3  code above.

       

      thanks
      //Making jQuery Google API
      function modify_jquery() {
      if (!is_admin()) {
      // comment out the next two lines to load the local copy of jQuery
      wp_deregister_script('jquery');
      wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js', false, '1.8.1');
      wp_enqueue_script('jquery');
      }
      }
      add_action('init', 'modify_jquery');
      suzanne


      Josh

        April 16, 2013 at 12:25 pm

        You might try the beta version of the calendar available in the pre-release channel that you can opt in to from your account page. WordPress hasn’t updated to 1.9.1 yet, so a lot of plugins haven’t been updated for jQuery 1.9.1 yet.

        Viewing 3 reply threads

        The support post ‘calendar not showing up after updating Jquery’ is closed to new replies.

        Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

        Event Espresso - Staging Server