Title: plebster's Replies | WordPress.org

---

# plebster

  [  ](https://wordpress.org/support/users/plebster/)

 *   [Profile](https://wordpress.org/support/users/plebster/)
 *   [Topics Started](https://wordpress.org/support/users/plebster/topics/)
 *   [Replies Created](https://wordpress.org/support/users/plebster/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/plebster/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/plebster/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/plebster/engagements/)
 *   [Favorites](https://wordpress.org/support/users/plebster/favorites/)

 Search replies:

## Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Events Manager - Calendar, Bookings, Tickets, and more!] Loading Maps displayed instead of map](https://wordpress.org/support/topic/loading-maps-displayed-instead-of-map/)
 *  Thread Starter [plebster](https://wordpress.org/support/users/plebster/)
 * (@plebster)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/loading-maps-displayed-instead-of-map/#post-17087750)
 * Fixes/ Workaround here
 * [https://gitlab.com/cooperativeit/event-manager-map-fix-block-themes](https://gitlab.com/cooperativeit/event-manager-map-fix-block-themes)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Events Manager - Calendar, Bookings, Tickets, and more!] Loading Maps displayed instead of map](https://wordpress.org/support/topic/loading-maps-displayed-instead-of-map/)
 *  Thread Starter [plebster](https://wordpress.org/support/users/plebster/)
 * (@plebster)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/loading-maps-displayed-instead-of-map/#post-17083910)
 * The issue is about badly formed JSON data that cannot be parsed. (The data is
   the data that will be sent to the google API)
 * The template file that generates the JSON is: templates/map-global.php
 * This template is called when a shortcode is used and is defined in em-shortcode.
   php
 * I believe that the arguments passed to the template file, and the construction
   of the JSON string are all working fine.
   The problem occurs when the string is
   rendered by the site into an HTML page.
 * When I view the source of the page I see the JSON string like:
   {“0″:””,”em_ajax”:
   true,”query”:”GlobalMapData”,”width”:”400px”,”height”:”300px”,”id”:1016433076}
 * My console shows:
   {“0″:””,”em_ajax”:true,”query”:”GlobalMapData”,”width”:”400px”,”
   height”:”300px”,”id”:1328304383}
 * The maps.js (although I worked in events-manager.js) picks that string from the
   HTML, tries to parse it and fails because of the badly formed string. i.e. it
   has curly quotes in it.
 * We managed to clean up the JSON string with a find a replace script in the javascript,
   and then the map loads fine.
 * I’ve no idea if there’s a better way to fix this before the javascript file tries
   to read the data from the page.
 * We tried and failed with
   1) Adding flags to json_decode in templates/map-global.
   php – see: [https://www.php.net/manual/en/function.json-encode.php](https://www.php.net/manual/en/function.json-encode.php)
   2) Trying to sanatize the json with PHP before it is rendered in HTML3) Trying
   to turn off wptexturize site wide – see: [https://developer.wordpress.org/reference/functions/wptexturize/#more-information](https://developer.wordpress.org/reference/functions/wptexturize/#more-information)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Events Manager - Calendar, Bookings, Tickets, and more!] Loading Maps displayed instead of map](https://wordpress.org/support/topic/loading-maps-displayed-instead-of-map/)
 *  Thread Starter [plebster](https://wordpress.org/support/users/plebster/)
 * (@plebster)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/loading-maps-displayed-instead-of-map/#post-17082248)
 * I can now see this error too, Hopefully we’ll have a fix fairly soon
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Events Manager - Calendar, Bookings, Tickets, and more!] Loading Maps displayed instead of map](https://wordpress.org/support/topic/loading-maps-displayed-instead-of-map/)
 *  Thread Starter [plebster](https://wordpress.org/support/users/plebster/)
 * (@plebster)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/loading-maps-displayed-instead-of-map/#post-17080776)
 * I have done some more testing with this, I can get this to work on the older ‘
   classic’ themes but this fails every time I use newer block theme.
 * I’m assuming that mawf.org is not using a block theme.
 * I hope there is a work around.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Events Manager - Calendar, Bookings, Tickets, and more!] Loading Maps displayed instead of map](https://wordpress.org/support/topic/loading-maps-displayed-instead-of-map/)
 *  Thread Starter [plebster](https://wordpress.org/support/users/plebster/)
 * (@plebster)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/loading-maps-displayed-instead-of-map/#post-17080710)
 * that’s really interesting, I might explore the firewall issue, although I can’t
   under stand why that would be. I see you’re on 6.3.1, what theme are you using
   and I’ll try and recreate that here.
 * Thanks again
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Pods - Custom Content Types and Fields] Pod Templates and Block CSS inclusions](https://wordpress.org/support/topic/pod-templates-and-block-css-inclusions/)
 *  Thread Starter [plebster](https://wordpress.org/support/users/plebster/)
 * (@plebster)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/pod-templates-and-block-css-inclusions/#post-16536529)
 * Thanks for that Jory, that is the conclusion that I had come to…
 * How do we go about enquing this? do I have to enque every css file into the pods
   template, are there any examples or documentation that you can show for this.
 * Thanks again

Viewing 6 replies - 1 through 6 (of 6 total)