Support

Home Forums Event Espresso Premium Calendar – Not Displaying

Calendar – Not Displaying

Posted: October 9, 2012 at 8:52 am

Viewing 12 reply threads


Rob Carvill

October 9, 2012 at 8:52 am

Hi there

The Calendar is not displaying on my page, the menu buttons are visible but nothing else.
I have found the troubleshooting tips https://eventespresso.com/wiki/calendar/ and I believe this is down to a Javascript error although I still am unsure how I can resolve this.

I have checked the footer and it correctly includes

And I have created a new template with the the short code but still the same outcome.

Can anyone help advise what to try next?
Thanks
Rob


Josh

  • Support Staff

October 9, 2012 at 8:55 am

Hi Rob,

We’d be glad to take a look, what is the URL to the page that the calendar is on?


Rob Carvill

October 9, 2012 at 9:00 am

Hi Josh!

Impressive response time!

http://www.walesworldwide.org/event-centre-calendar/

Currently only one event set up for 8th of Nov


Josh

  • Support Staff

October 9, 2012 at 9:22 am

From looking at the page source, I can see that there are a few possibilities here. One is that the theme has hardcoded a version jQuery that is not included with WordPress. It’s best practice to load in the jQuery library that’s bundled with WordPress. There is some more information and some example code for how to fix this here:
https://eventespresso.com/2012/08/using-jquery-in-safe-mode/

Although this may not be the only issue. There is also some embedded JavaScript in the mailchimp signup for in the footer widget, which is calling yet another version of the jQuery library. That needs to be removed. I don’t know if this is from a plugin, or the theme, or was pasted in, but this really should be removed:

script.src = 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js';

This should be tracked down and removed, it looks to me like it is in a widget, but you may know right away where the code is coming from.

It may also help to try deactivating some of the other plugins that are outputting JavaScript onto that page to narrow this down.


Rob Carvill

October 9, 2012 at 9:35 am

Ok thanks Josh! I have removed the mailchimp code from the footer but this is not the issue.

I will look into the fix you have posted above to see if I can get anywhere with this.

I have noticed that the Calander page disables my drop down menu, is this of any help to you?

Thanks
Rob


Josh

  • Support Staff

October 9, 2012 at 9:43 am

Yeah, the mailchimp code actually does a check for jQuery, and if it’s loaded, it won’t load the other copy, which should be fine.

If you can swap in the WordPress bundled version of jQuery, it should fix the issues you’re having. Here’s a copy of that page with the bundled version of jQuery swapped in:
http://jsfiddle.net/UDYBW/embedded/result/

So if you look at this section of the WordPress codex:
http://codex.wordpress.org/Function_Reference/wp_enqueue_script#Load_a_default_WordPress_script_from_a_non-default_location

You’ll note the warnings there about loading a default WP script from a non-default location.

So in the code example this:

function my_scripts_method() {
    wp_deregister_script( 'jquery' );
    wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js');
    wp_enqueue_script( 'jquery' );
}    

add_action('wp_enqueue_scripts', 'my_scripts_method');

can be changed to this as an example:

function my_scripts_method() {
    wp_enqueue_script( 'jquery' );
}    
add_action('wp_enqueue_scripts', 'my_scripts_method');


Rob Carvill

October 9, 2012 at 9:50 am

Ah I see!

Okay before I look into the link you have posted I have located my functions file and found this;

        } else {

        wp_deregister_script( 'jquery' );
        wp_deregister_script( 'l10n' );

        wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js' );
        wp_register_script( 'html5shim', 'http://html5shim.googlecode.com/svn/trunk/html5.js' );
        wp_register_script( 'superfish', get_template_directory_uri() . '/js/superfish.js', array( 'jquery' ) );
        wp_register_script( 'buddypress', get_template_directory_uri() . '/js/buddypress.js', array( 'jquery' ) );
        wp_register_script( 'colorbox', get_template_directory_uri() . '/js/jquery.colorbox-min.js', array( 'jquery' ) );
        wp_register_script( 'theme_custom', get_template_directory_uri() . '/js/custom.js', array( 'jquery' ), 1.0, TRUE );

        wp_enqueue_script( array( 'superfish', 'colorbox', 'buddypress', 'theme_custom' ) );

        if( is_single() ) wp_enqueue_script( 'comment-reply' );
        if( $is_IE ) wp_enqueue_script( 'html5shim' );
    }
}

}

Am I looking at the correct piece of code?


Josh

  • Support Staff

October 9, 2012 at 10:05 am

That looks like it, although not knowing what is before that ‘else’, I can’t say for sure.


Rob Carvill

October 9, 2012 at 10:56 am

Thanks Josh

I am out of the office until tomorrow so I will pick it back up then! Thanks for your help today!


Rob Carvill

October 10, 2012 at 2:14 am

Hi Josh

I have hosted a .txt version of my functions file here; http://www.walesworldwide.org/usefullinks/functions.txt

are you able to advise which sections should be substituted.

Also in doing so will this effect the rest of my website in any way?

Thanks
Rob


Josh

  • Support Staff

October 10, 2012 at 11:20 am

If

wp_deregister_script( 'jquery' );

and

wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js' );

are removed, the WordPress bundled version of jQuery should load instead. If there’s another script somewhere that depends on jQuery, but isn’t declaring this dependancy, you can add this where you removed the above:

wp_enqueue_script( 'jquery' );

This may affect performance in the case where someone already had the google CDN version of jQuery cached in their browser, they would now need to load jQuery from your site instead. This can be overcome by installing the use google libraries plugin to safely load jQuery from Google.
http://wordpress.org/extend/plugins/use-google-libraries/

The site should be tested as it’s possible that some scripts may not have been written to be compatible with jQuery’s no-conflict mode. All of Event Espresso’s scripts are compatible with no-conflict mode, as well as core WordPress scripts, but I cannot make any guarantees for any other plugins or the theme’s scripts.


Rob Carvill

October 11, 2012 at 5:15 am

Thanks Josh

I will look into this!

On another note I didn’t receive a follow-up email regarding this post although I checked “Notify me of follow…” just to bring to your attention.

Cheers
Rob


Josh

  • Support Staff

October 11, 2012 at 8:16 am

Hi Rob,

Thanks for letting us know about the email follow up. We’ve been working on the the email component of the site, so there may be brief interruptions in the follow-up email service. We are working on getting this all sorted and hope to have it all working again soon.

Viewing 12 reply threads

The support post ‘Calendar – Not Displaying’ 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