Events do not appear in IE 8 & 9 when admin and frontend schemes are different
-
When FORCE_SSL_ADMIN is true, admin_url() returns an HTTPS URL. If is_ssl() is false (i.e. the frontend page is accessed over HTTP), there is a scheme mismatch that prevents the call to admin-ajax.php from working in IE 8 & 9. This is a limitation of XDomainRequest used in IE < 10 – see #7 on https://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx.
Steps to reproduce (WP FullCalendar 0.8.4):
- Add
define('FORCE_SSL_ADMIN', true);
to wp-config.php - Add
[fullcalendar]
to a page - View page over HTTP in Chrome or Firefox – events appear
- View page over HTTP in IE 8 or 9 – events do not appear
- View page over HTTPS in IE 8 or 9 – events appear
Fix: modify localize_script() in wp-fullcalendar.php:
//$js_vars['ajaxurl'] = admin_url('admin-ajax.php'); if( is_ssl() ) { $js_vars['ajaxurl'] = admin_url('admin-ajax.php', 'https'); } else { $js_vars['ajaxurl'] = admin_url('admin-ajax.php', 'http'); }
- Add
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Events do not appear in IE 8 & 9 when admin and frontend schemes are different’ is closed to new replies.