Javascript Error when Viewing Full Calendar (AJAX)
-
Hello,
When I click on the Arrows to go from month to month I get the following error:
Error: em_ajaxify is not defined
The AJAX still loads each month but the error comes up each time you click the arrow.
Note: this is for the full calendar being displayed on in a template file (not on the specified “Events” page).
Does anyone know whats going on?
Thanks in advance.
-
Lets start with the browser.
Which browser are you using and which version?do any of the event calendars work? if not then it’s a js error, otherwise it could be a bug (although no complaints like this yet)
On MU installation we got the calendar to work AFTER we checked DB and found that Blog ID was missing in em-events-table it was either NULL or 1 -> like the main blog.
So my question was answered why the events are not accessed when setting option to:
Link sub-site events directly to sub-site?
We will create some events to see if this is now properly inserted into the db.
———————————————————————————————-
With ID in the correct Blog it works just fine see small calendar: https://forum.portico-bangkok.com
On the main site we have problems ALL browsers throw this error
jQuery.datepicker.setDefaults(jQuery.datepicker.regional[EM.locale]);
datepicker is undefinedand
jQuery(function($){$.datepicker.reg…nthAfterYear:false,yearSuffix:”};});
datepicker is undefined
So we are checking now all plugins and deregister scripts one by one for this page to see what is causing it.hey dorothai, we’ll look at some of this today (along with your other issues). Mind you, do you have WPLANG set to anything? that shouldn’t happen if empty if you have a ticket open let me know on there
Resolved Marcus
The WPLANG was simply empty.
The datepicker works perfectly now.
I will let you know about the outcome of the tests with blog_id.there is a bug regarding blog_id, I’m testing a bug tracker atm to manage these things a bit more efficiently ??
Lets start with the browser.
Which browser are you using and which version?Firefox 4.0.1
do any of the event calendars work? if not then it’s a js error, otherwise it could be a bug (although no complaints like this yet)
None of the calendars seem to work (they all give the error). I haven’t modified any of the js files as of yet. Is it possible it’s a plugin conflict?
I’m not sure what to do to fix this issue, is there a different way to use AJAX or worst case turn it off and still be able to page through the calendar?
Thanks for your help.
You can check if any other plugin is using
ajaxify
by running a search with dreamweaver throughtout the plugin directory and theme directory.
Then you can deregister the javascript from the other source for the events pages, where ever you display the calendars.
We have tested the calendars in IE7 – IE8 – IE9 – Safari and FF they work on all browsers.You can check if any other plugin is using
ajaxify
by running a search with dreamweaver throughtout the plugin directory and theme directory.
Then you can deregister the javascript from the other source for the events pages, where ever you display the calendars.
We have tested the calendars in IE7 – IE8 – IE9 – Safari and FF they work on all browsers.Hmmm, even with all of my plugins turned off I am still getting the error.
I am searching the plugin folders now.
Is there any required settings for the plugin AJAX to work (within the plugin settings or otherwise)?
Note: I am using a modified version of the Twenty Ten theme.
you should try the default twentyten theme, good chance it’s your mods if the plugins aren’t causing an issue. unless you have moved your domains e.g. from a local to public server, that can cause ajax issues in several plugins.
Ok, so I updated to the newest version of events manager and now I get the same error but now it doesn’t work (when I click the next button the overlay comes up with the overlay and appears to be loading).
I tried switching back to the default theme, but the same issue occurs.
Any ideas?
I’ve also tried adding and removing jquery around in the header, but no luck with this.
Here is my header code in a nutshell (not sure if it helps any):
<head> <meta charset="UTF-8" /> <title>Exhibits</title> <script type="text/javascript" src="https://www.website.com/test/wp-content/themes/blank-theme/scripts/jquery.js"></script> <link rel="profile" href="https://gmpg.org/xfn/11" /> <link rel="stylesheet" type="text/css" media="all" href="https://www.website.com/test/wp-content/themes/blank-theme/style.css" /> <link rel="pingback" href="https://www.website.com/test/xmlrpc.php" /> <meta name='robots' content='noindex,nofollow' /> <link rel="alternate" type="application/rss+xml" title="Feed" href="https://www.website.com/test/feed/" /> <link rel="alternate" type="application/rss+xml" title="Comments Feed" href="https://www.website.com/test/comments/feed/" /> <link rel='stylesheet' id='admin-bar-css' href='https://www.website.com/test/wp-includes/css/admin-bar.css?ver=20110325' type='text/css' media='all' /> <link rel='stylesheet' id='em-ui-css-css' href='https://www.website.com/test/wp-content/plugins/events-manager/includes/css/jquery-ui-1.8.13.custom.css?ver=3.1.3' type='text/css' media='all' /> <link rel='stylesheet' id='events-manager-css' href='https://www.website.com/test/wp-content/plugins/events-manager/includes/css/events_manager.css?ver=3.1.3' type='text/css' media='all' /> <link rel='stylesheet' id='wpss_style-css' href='https://www.website.com/test/wp-content/plugins/wordpress-simple-survey/style.css?ver=3.1.3' type='text/css' media='all' /> <link rel='stylesheet' id='wpss_uicore-css' href='https://www.website.com/test/wp-content/plugins/wordpress-simple-survey/css/ui.core.css?ver=3.1.3' type='text/css' media='all' /> <link rel='stylesheet' id='wpss_uitheme-css' href='https://www.website.com/test/wp-content/plugins/wordpress-simple-survey/css/ui.theme.css?ver=3.1.3' type='text/css' media='all' /> <link rel='stylesheet' id='wpss_probar-css' href='https://www.website.com/test/wp-content/plugins/wordpress-simple-survey/css/ui.progressbar.css?ver=3.1.3' type='text/css' media='all' /> <link rel='stylesheet' id='wp-paginate-css' href='https://www.website.com/test/wp-content/plugins/wp-paginate/wp-paginate.css?ver=1.2.3' type='text/css' media='screen' /> <script type='text/javascript' src='https://www.website.com/test/wp-includes/js/l10n.js?ver=20101110'></script> <script type='text/javascript' src='https://www.website.com/test/wp-includes/js/jquery/jquery.js?ver=1.4.4'></script> <script type='text/javascript' src='https://www.website.com/test/wp-content/plugins/wordpress-simple-survey/js/jquery-ui-1.8.10.full.min.js?ver=1.8.10'></script> <script type='text/javascript' src='https://www.website.com/test/wp-content/plugins/wordpress-simple-survey/js/custom.js?ver=1.0'></script> <link rel="EditURI" type="application/rsd+xml" title="RSD" href="https://www.website.com/test/xmlrpc.php?rsd" /> <link rel="wlwmanifest" type="application/wlwmanifest+xml" href="https://www.website.com/test/wp-includes/wlwmanifest.xml" /> <link rel='index' title='' href='https://www.website.com/test/' /> <link rel='up' title='What’s On' href='https://www.website.com/test/' /> <link rel='prev' title='Festival' href='https://www.website.com/test/whats-on/festival/' /> <link rel='next' title='Event' href='https://www.website.com/test/event/' /> <meta name="generator" content="WordPress 3.1.3" /> <link rel='canonical' href='https://www.website.com/test/exhibits/' /> <style type="text/css" media="print">#wpadminbar { display:none; }</style> <style type="text/css"> html { margin-top: 28px !important; } * html body { margin-top: 28px !important; } </style> </head>
have you tried disabling other plugins also? if it’s a js error it’s 99% chance that this is your issue.
Hi Marcus
he could try to deregister the scripts of other plugins or theme on this page, yet he cannot deregister the style of his theme.add_action( ‘wp_print_styles’, ‘my_deregister_javascript’, 100 );
if(is_page(‘Thailand Events’)) {
wp_deregister_script(‘premiumpress’); //this is the theme we use
wp_deregister_script(‘bp-album-js’);
wp_deregister_script(‘more hooks here’); //this has also a calendar and date section as it
wp_deregister_script(‘as many as you need’);
}
}
also styles can cause it as css classes are building the calendar and click functions is most often connected to a css class like arrowadd_action( ‘wp_print_styles’, ‘my_deregister_styles’, 100 );
function my_deregister_styles() {
if( is_home() or is_page(‘Thailand Events’) ){ //calendar on homepage and events page
wp_deregister_style( ‘bp-album-css’ );
}
}not much I can do about conflicting themes….
- The topic ‘Javascript Error when Viewing Full Calendar (AJAX)’ is closed to new replies.