Title: Map shows undefined
Last modified: June 11, 2017

---

# Map shows undefined

 *  Resolved [analogguy](https://wordpress.org/support/users/analogguy/)
 * (@analogguy)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/map-shows-undefined/)
 * I’m using the latest EME frontend submit with the latest EME version.
    When submiting
   a new event it shows up in EME (backend) & the defined page. In EME Backend and
   EME frontside submit it shows up with correct Google maps location. On the post
   page the event shows the Google Map window for a short time green and than grey
   and a note “undefined”. A valid Google API Key is set up in settings. I had a
   look on this issue: I enabled the Google Maps integration, but instead of the
   map there is a green background. What should I do? [http://www.e-dynamics.be/wordpress/faq/](http://www.e-dynamics.be/wordpress/faq/)
   I’m using custom community theme (buddypress/ bbpress compatible) and the header.
   php shows this: <head> <meta charset=”<?php bloginfo( ‘charset’ ); ?>” /> <meta
   name=”viewport” content=”width=device-width, initial-scale=1.0″ /> <link rel=”
   profile” href=”[http://gmpg.org/xfn/11&#8243](http://gmpg.org/xfn/11&#8243); /
   > <link rel=”pingback” href=”<?php bloginfo( ‘pingback_url’ ); ?>” /> <?php wp_head();?
   > </head>
 * Hopefully this is my user error and can be fixed with one or two clicks and is
   not a bug/ server problem.

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/map-shows-undefined/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/map-shows-undefined/page/2/?output_format=md)

 *  Plugin Author [Franky](https://wordpress.org/support/users/liedekef/)
 * (@liedekef)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/map-shows-undefined/#post-9218199)
 * Do you have an example I can check?
 *  Plugin Author [Franky](https://wordpress.org/support/users/liedekef/)
 * (@liedekef)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/map-shows-undefined/#post-9218247)
 * Also: I had the same problem on my side, but a simple refresh of the page resolved
   it (so it is in fact a browser cache problem I experienced).
 *  Thread Starter [analogguy](https://wordpress.org/support/users/analogguy/)
 * (@analogguy)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/map-shows-undefined/#post-9220192)
 * Try this. Site is in the middle of the build. Just opened it/ disabled maintenance
   mode for a test:
    [http://microemobility.org/en/events/8/test/](http://microemobility.org/en/events/8/test/)
   Safari and Firefox showing the same short green box and and than grey with undefined.
   Only when presenting in the final view the Google Map disappears. You can see
   it it in the EME backend and while submitting in the webform of eme frontside
   submit
    -  This reply was modified 9 years, 3 months ago by [analogguy](https://wordpress.org/support/users/analogguy/).
    -  This reply was modified 9 years, 3 months ago by [analogguy](https://wordpress.org/support/users/analogguy/).
 *  Plugin Author [Franky](https://wordpress.org/support/users/liedekef/)
 * (@liedekef)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/map-shows-undefined/#post-9220374)
 * Seems to me this is due to another google-maps related plugin you have active,
   it interferes with the way EME loads the google maps API. I tried installing 
   geo-my-wp and wp-gpx-maps here, and in both cases the map still shows ok afterwards.
   So try disabling all plugins (except EME) and re-enable one by one until you 
   find the one that interferes with EME.
 *  Plugin Author [Franky](https://wordpress.org/support/users/liedekef/)
 * (@liedekef)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/map-shows-undefined/#post-9220482)
 * Also, maybe try if this small change helps you in any way:
    [https://plugins.trac.wordpress.org/changeset/1676777/](https://plugins.trac.wordpress.org/changeset/1676777/)
 *  Thread Starter [analogguy](https://wordpress.org/support/users/analogguy/)
 * (@analogguy)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/map-shows-undefined/#post-9220542)
 * After disabling all (incl. frontside submit) the problem was still there. So 
   I deactivated EME also and activated again – still there. Than I changed the 
   theme which I did this morning (with all plugins activ) and this time changing
   from custom community 2.0 to twenty twelve showed the mac correct. Switching 
   the Theme a couple of time made the proof.
    So I need to deal with the Theme 
   developer or search for a new theme also compatible to BuddyPress, 1 sub layer
   menus and comes with a footer…
 *  Plugin Author [Franky](https://wordpress.org/support/users/liedekef/)
 * (@liedekef)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/map-shows-undefined/#post-9220562)
 * Seems an older theme to me, but still … I’ll check it out here too.
    Did the 
   small change help in any way?
 *  Plugin Author [Franky](https://wordpress.org/support/users/liedekef/)
 * (@liedekef)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/map-shows-undefined/#post-9220620)
 * Btw: using my change (and your theme) here locally, the map shows fine. Without
   the extra change, the map doesn’t load (it seems the theme removes some linebreaks,
   and that causes issues with the redundant javascript comment lines that were 
   still present).
 *  [cfddirect](https://wordpress.org/support/users/cfddirect/)
 * (@cfddirect)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/map-shows-undefined/#post-9221005)
 * Hi Franky,
 * I think I am seeing the same issue as reported in this thread. For info:
    – on
   the public side, each map is OK in 1.8.4, but a green block in 1.8.5-1.8.7 – 
   it is not a browser cache issue because I get the same when I change browsers
   and devices – the maps on the backend/private side, ie. location page, is fine(
   at least in 1.8.7) – an example page is: [https://cfd.direct/openfoam-training/london](https://cfd.direct/openfoam-training/london)–
   where I have reverted to 1.8.4.
 * Catching up on this thread, do you suggest trying 1.8.7 with the following patch?:
   
   [https://plugins.trac.wordpress.org/changeset/1676777/](https://plugins.trac.wordpress.org/changeset/1676777/)
 * Let me know, and I will test and report back.
 * Thanks,
 * Chris
 *  Thread Starter [analogguy](https://wordpress.org/support/users/analogguy/)
 * (@analogguy)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/map-shows-undefined/#post-9221188)
 * I’ve went back t the theme “causing” the problem. Did the patch mentioned here:
 * —
    Also, maybe try if this small change helps you in any way: [https://plugins.trac.wordpress.org/changeset/1676777/](https://plugins.trac.wordpress.org/changeset/1676777/)—
 * It looks fine. I do some other test events and come back
 *  Thread Starter [analogguy](https://wordpress.org/support/users/analogguy/)
 * (@analogguy)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/map-shows-undefined/#post-9221218)
 * Awesome. Did 3 testevents and it works fine on this tests. Thanks a lot.
 *  Plugin Author [Franky](https://wordpress.org/support/users/liedekef/)
 * (@liedekef)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/map-shows-undefined/#post-9221609)
 * 1.8.7 contains this fix (in fact it probably never worked or should have worked
   in older versions and that theme).
    You seem to have another problem. What is
   your theme? And php version, wordpress version, any javascript errors in the 
   browser console?
 * Edit: your theme seems to be “Spacious pro”, but it seems to be a very old (and
   no longer maintained) theme, is that true? Also: it is of course impossible for
   me to fix something that works (your 1.8.4 site), so I’d need a test setup on
   your side. Did you try with a default WP theme?
    -  This reply was modified 9 years, 3 months ago by [Franky](https://wordpress.org/support/users/liedekef/).
 *  Thread Starter [analogguy](https://wordpress.org/support/users/analogguy/)
 * (@analogguy)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/map-shows-undefined/#post-9222364)
 * Theme is called Custom Community 2.0 ([https://wordpress.org/themes/custom-community/](https://wordpress.org/themes/custom-community/)).
   When using BuddyPress/ bbPress, 2 sub layer menus and footer you haven’t a big
   choice of themes anymore. Maybe to have a closer look at Emmet Lite – not sure
   about the menu stuff.
    PHP version should be 7. For tests I use Twenty twelve
   if encountering problems. How can I help you with tests on my site? Do you need
   an account or should I put in some special events?
    -  This reply was modified 9 years, 3 months ago by [analogguy](https://wordpress.org/support/users/analogguy/).
 *  Plugin Author [Franky](https://wordpress.org/support/users/liedekef/)
 * (@liedekef)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/map-shows-undefined/#post-9222370)
 * [@analogguy](https://wordpress.org/support/users/analogguy/): your problem is
   fixed.
    The question above was directed at [@cfddirect](https://wordpress.org/support/users/cfddirect/).
 *  [cfddirect](https://wordpress.org/support/users/cfddirect/)
 * (@cfddirect)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/map-shows-undefined/#post-9223214)
 * Hi Franky (@liedekef)
 * I had a look into this further. With 1.8.7, I am actually finding that map loading
   is random in Firefox. Sometimes they load, sometimes they don’t – roughly 50%:
   50%.
 * I ran Web Developer -> Inspector and noticed it was giving a reference error:
   “
   Reference Error: google is not defined”
 * I googled this and it seems this is caused by the “maps.google.com/maps/api/js…”
   not being loaded before the file that uses it:
    [https://stackoverflow.com/questions/33495879/uncaught-referenceerror-google-is-not-defined-at-google-maps-marker](https://stackoverflow.com/questions/33495879/uncaught-referenceerror-google-is-not-defined-at-google-maps-marker)(
   In this case the file using it is eme_location_map.js)
 * The file is not loaded is because the loading uses the async flag. I deleted 
   the async and defer flags on line 3694 of eme_events.php in the eme_general_footer()
   
   function as follows: echo “<script type=’text/javascript’ src=’//maps.google.
   com/maps/api/js?”.$gmap_api_key.”‘></script>\n”;
 * The maps now load 100% of the time in Firefox.
 * See for example:
    [https://cfd.direct/openfoam-training/munich/](https://cfd.direct/openfoam-training/munich/)
   [https://cfd.direct/openfoam-training/chicago/](https://cfd.direct/openfoam-training/chicago/)
   [https://cfd.direct/openfoam-training/london/](https://cfd.direct/openfoam-training/london/)
 * I appreciate that we want ideally to load the google/js file asynchronously, 
   but I don’t know if it is possible to pause loading the eme_location_map.js file
   until the google/js file is loaded.
 * I note the same code is in the eme_general_head() function also
 * By the way, is there a reason for not using coding style
    … async> rather than…
   async=”async”>
 * Thanks,
 * Chris

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/map-shows-undefined/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/map-shows-undefined/page/2/?output_format=md)

 The topic ‘Map shows undefined’ is closed to new replies.

 * ![](https://ps.w.org/events-made-easy/assets/icon-256x256.png?rev=1856035)
 * [Events Made Easy](https://wordpress.org/plugins/events-made-easy/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/events-made-easy/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/events-made-easy/)
 * [Active Topics](https://wordpress.org/support/plugin/events-made-easy/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/events-made-easy/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/events-made-easy/reviews/)

 * 18 replies
 * 3 participants
 * Last reply from: [cfddirect](https://wordpress.org/support/users/cfddirect/)
 * Last activity: [9 years, 3 months ago](https://wordpress.org/support/topic/map-shows-undefined/page/2/#post-9226275)
 * Status: resolved