ReferenceError: EM is not defined
-
After upgrading my site to 3.6 yesterday, the Events Manager plugin, which was working, now breaks upon submit:
ReferenceError: EM is not defined url: EM.bookingajaxurl,The error is clearly due to some unnecessary escaping happening in the CDATA tag where the EM variable is defined. As you can see (and I’m only showing part of it), everything is overly escaped and as such, the line breaks throw off the balance of quotes, creating a parsing error on the EM var itself. Hence, the JS error seen when trying to submit the form.
<script type='text/javascript'> /* <![CDATA[ */ var EM = {"ajaxurl":"http:\/\/MYSITE.com\/wp-admin\/admin-ajax.php","locationajaxurl":"http:\/\/MYSITE.com\/wp-admin\/admin-ajax.php?action=locations_search" .... (ETC).... "","bookingInProgress":"Please wait while the booking is being submitted.","tickets_save":"Save Ticket", ... (ETC) }; /* ]]> */ </script>I’m not blaming the plugin. I’m sure it’s a something amiss in the theme template, or perhaps in my config. But I’m not a WP expert, so I’m not sure where to look. I’m happy to hack code if needed. Just give me a nudge in the right direction.
Thanks in advance.
The topic ‘ReferenceError: EM is not defined’ is closed to new replies.