Start with a clean install of wordpress and then just install Events Manager and then add the locations and see if it works. You can then continue to make changes by adding any additional plugins and themes as well as Evnts Manager settings changes until you find the problem.
Thank you for all your help. It has finally been resolved!
@emilyvansomeren Could you please tell us how you fixed it? We’re facing the same problem here. We have a Javascript error like this:
Uncaught (in promise) SyntaxError: Expected property name or '}' in JSON at position 1 (line 1 column 2)
at Function.parse as parseJSON
at em_maps_load_locations (maps.js:41:23)
at HTMLDivElement. (maps.js:136:60)
at Function.each (jquery-3.4.1.min.js?ver=3.4.1:2:2777)
at k.fn.init.each (jquery-3.4.1.min.js?ver=3.4.1:2:1419)
at em_maps (maps.js:136:33)
at js?v=quarterly&libraries=places&callback=em_maps&key=AIzaSyA_y7NmQY28SH0ldRcTe6NdZGgjLyTwee8:288:509
at js?v=quarterly&libraries=places&callback=em_maps&key=AIzaSyA_y7NmQY28SH0ldRcTe6NdZGgjLyTwee8:288:21
It’s a error that occurs on this piece of code:
function em_maps_load_locations(el){
var el = jQuery(el);
var map_id = el.attr('id').replace('em-locations-map-','');
var em_data = jQuery.parseJSON( el.nextAll('.em-locations-map-coords').first().text() );
if( em_data == null ){
var em_data = jQuery.parseJSON( jQuery('#em-locations-map-coords-'+map_id).text() );
}
The JSON looks like this:
{“em_ajax”:true,”query”:”GlobalEventsMapData”,”width”:”400px”,”height”:”300px”,”id”:486052607}
However in my html it parses html entities:
<div class='em-locations-map-coords' id='em-locations-map-coords-1667966170' style="display:none; visibility:hidden;">{“em_ajax”:true,”query”:”GlobalEventsMapData”,”width”:”400px”,”height”:”300px”,”id”:1667966170}</div>
Like this:
<div class=’em-locations-map-coords’ id=’em-locations-map-coords-1667966170′ style=”display:none; visibility:hidden;”>{“em_ajax”:true,”query”:”GlobalEventsMapData”,”width”:”400px”,”height”:”300px”,”id”:1667966170}</div>
It seems the quotes are not the correct opening and closing quotes?
-
This reply was modified 2 years, 2 months ago by
rienco.
@rienco In my case, the cause was a conflict with the Advanced Custom Fields plugin. We added the map shortcode to page.php to bypass this.