I am trying to: create a view of a custom post type that has a location that I would like to show the map of upon viewing the post type
Link to a page where the issue can be seen: hidden link
I expected to see: a map and a marker
Instead, I got: no map and an error "Uncaught ReferenceError: google is not defined" in the console (see attached image)
Additional notes: I recently updated my site to WP 5.0.2 as well as Toolset (Types and Views) and theme Avada 5.7.2 and I was not having the Google Maps issue and error. I attempted to add the optional 2nd Key to the Toolset > Maps > Settings area and I am not able to update or click the "Check API" button on the page.
Hi, please try the following troubleshooting steps first:
- Clear your browser cache, log out, and log back in. Test again.
- Temporarily deactivate all plugins except Types, Views, and Maps. Activate a default theme like Twenty Nineteen, then test again.
- If the problem is resolved, reactivate your theme and other plugins one by one until the problem returns.
- If the problem is not resolved, I'll be glad to take a closer look.
Yeah, as expected it is the Avada theme... unfortunately this leaves little room for me and my client as I can't undo the theme selection.
I can begin the process of figuring out which version of Toolset Types / Views gets broken by which Avada version, but could you all take a look. I'm sure that I will likely not be the only person with this issue...
Thanks.
I'm running some map tests locally with Avada 5.7.2 and I'm not experiencing the same error you described. Can you tell me:
- Are you using a custom map style / JSON file? If so, can you share it?
- Go to Avada > Theme Options > Advanced > Theme Features and tell me if toggling the Google Maps script setting has any effect.
- Go to Avada > Theme Options > Advanced > Dynamic CSS and JS, and reset Fusion caches.
- Also in Avada > Theme Options > Advanced > Dynamic CSS and JS, temporarily disable the JavaScript compiler if it's in use.
Please let me know the results of these tests.
I attempted each of your suggestions w/o success.
In the Avada > Contact form > Google Map Styling - I did have that set to Custom, but switching it back to the Default Styling did not change the error. I left that setting at Default Styling before doing the other recommended tests.
Note, we are also using a CDN and Breeze plugin for caching. Just in case, I turned these off as well when doing the tests.
Anything else I can take a look at?
If there's any custom JavaScript code in any of these locations, you can try temporarily commenting it all out:
- Theme options like field code, tracking code
- Layouts JS
- Views editor JS panels
- etc.
If none of these solves the problem, I can try making a clone of your site to run some additional tests. I'll activate private reply fields here so you can share login credentials with me if necessary.