Hi,
I don't know why, but the Google Maps JavaScript API seems to be include multiple times in my site.
I just have added that key code to toolset. For Divi I've chosen another key, and now I've deleted the key for divi.
But the error is still there, especially on a page that doesn't use a map.
Ho can I solve that prob?
... it happens also on other pages, where I'm using toolset and Divi.
Hi, can you try these troubleshooting steps first? If you have a staging site it would be best to test there.
- Temporarily switch to a default theme like Twenty Nineteen and deactivate all plugins except Toolset Types, Views and Maps.
- Test again. If the problem is not resolved, look for any JavaScript snippets that you may have included on the site that may be including an additional maps API key or initialization script. Maybe there is an extra script in a widget or footer element?
- If the problem was resolved, then reactivate your theme and other plugins one by one until the problem returns. Let me know what you find out and we can go from there.
Hi Christian, I can't change the theme, 'cause it is divi and so I got lots of other errors.
But I've found these errors in the console
js?libraries=places&v=3&key=AIzaSyBxfigMXZZiXMyDL_v03NFUM8Wm6krdbNY:131 You have included the Google Maps JavaScript API multiple times on this page. This may cause unexpected errors.
Lh @ js?libraries=places&v=3&key=AIzaSyBxfigMXZZiXMyDL_v03NFUM8Wm6krdbNY:131
Th @ js?libraries=places&v=3&key=AIzaSyBxfigMXZZiXMyDL_v03NFUM8Wm6krdbNY:128
google.maps.Load @ js?libraries=places&v=3&key=AIzaSyBxfigMXZZiXMyDL_v03NFUM8Wm6krdbNY:18
(anonymous) @ js?libraries=places&v=3&key=AIzaSyBxfigMXZZiXMyDL_v03NFUM8Wm6krdbNY:216
(anonymous) @ js?libraries=places&v=3&key=AIzaSyBxfigMXZZiXMyDL_v03NFUM8Wm6krdbNY:216
common.js:69 Uncaught TypeError: _.p is not a function
at common.js:69
at js?libraries=places&v=3&key=AIzaSyBxfigMXZZiXMyDL_v03NFUM8Wm6krdbNY:185
at js?libraries=places&v=3&key=AIzaSyBxfigMXZZiXMyDL_v03NFUM8Wm6krdbNY:80
at js?libraries=places&v=3&key=AIzaSyBxfigMXZZiXMyDL_v03NFUM8Wm6krdbNY:185
at Je (js?libraries=places&v=3&key=AIzaSyBxfigMXZZiXMyDL_v03NFUM8Wm6krdbNY:80)
at Fe.ac (js?libraries=places&v=3&key=AIzaSyBxfigMXZZiXMyDL_v03NFUM8Wm6krdbNY:185)
at common.js:1
(anonymous) @ common.js:69
(anonymous) @ js?libraries=places&v=3&key=AIzaSyBxfigMXZZiXMyDL_v03NFUM8Wm6krdbNY:185
(anonymous) @ js?libraries=places&v=3&key=AIzaSyBxfigMXZZiXMyDL_v03NFUM8Wm6krdbNY:80
(anonymous) @ js?libraries=places&v=3&key=AIzaSyBxfigMXZZiXMyDL_v03NFUM8Wm6krdbNY:185
Je @ js?libraries=places&v=3&key=AIzaSyBxfigMXZZiXMyDL_v03NFUM8Wm6krdbNY:80
Fe.ac @ js?libraries=places&v=3&key=AIzaSyBxfigMXZZiXMyDL_v03NFUM8Wm6krdbNY:185
(anonymous) @ common.js:1
util.js:144 Uncaught TypeError: _.p is not a function
at util.js:144
at js?libraries=places&v=3&key=AIzaSyBxfigMXZZiXMyDL_v03NFUM8Wm6krdbNY:185
at Object.<anonymous> (js?libraries=places&v=3&key=AIzaSyBxfigMXZZiXMyDL_v03NFUM8Wm6krdbNY:80)
at js?libraries=places&v=3&key=AIzaSyBxfigMXZZiXMyDL_v03NFUM8Wm6krdbNY:185
at js?libraries=places&v=3&key=AIzaSyBxfigMXZZiXMyDL_v03NFUM8Wm6krdbNY:80
at js?libraries=places&v=3&key=AIzaSyBxfigMXZZiXMyDL_v03NFUM8Wm6krdbNY:185
at Je (js?libraries=places&v=3&key=AIzaSyBxfigMXZZiXMyDL_v03NFUM8Wm6krdbNY:80)
at Fe.ac (js?libraries=places&v=3&key=AIzaSyBxfigMXZZiXMyDL_v03NFUM8Wm6krdbNY:185)
at common.js:1
(anonymous) @ util.js:144
(anonymous) @ js?libraries=places&v=3&key=AIzaSyBxfigMXZZiXMyDL_v03NFUM8Wm6krdbNY:185
(anonymous) @ js?libraries=places&v=3&key=AIzaSyBxfigMXZZiXMyDL_v03NFUM8Wm6krdbNY:80
(anonymous) @ js?libraries=places&v=3&key=AIzaSyBxfigMXZZiXMyDL_v03NFUM8Wm6krdbNY:185
(anonymous) @ js?libraries=places&v=3&key=AIzaSyBxfigMXZZiXMyDL_v03NFUM8Wm6krdbNY:80
(anonymous) @ js?libraries=places&v=3&key=AIzaSyBxfigMXZZiXMyDL_v03NFUM8Wm6krdbNY:185
Je @ js?libraries=places&v=3&key=AIzaSyBxfigMXZZiXMyDL_v03NFUM8Wm6krdbNY:80
Fe.ac @ js?libraries=places&v=3&key=AIzaSyBxfigMXZZiXMyDL_v03NFUM8Wm6krdbNY:185
(anonymous) @ common.js:1
util.js:14 Uncaught (in promise) TypeError: Cannot read property 'yb' of undefined
at Object._.U (util.js:14)
at js?libraries=places&v=3&key=AIzaSyBxfigMXZZiXMyDL_v03NFUM8Wm6krdbNY:128
_.U @ util.js:14
(anonymous) @ js?libraries=places&v=3&key=AIzaSyBxfigMXZZiXMyDL_v03NFUM8Wm6krdbNY:128
Promise.then (async)
(anonymous) @ js?libraries=places&v=3&key=AIzaSyBxfigMXZZiXMyDL_v03NFUM8Wm6krdbNY:128
setTimeout (async)
Th @ js?libraries=places&v=3&key=AIzaSyBxfigMXZZiXMyDL_v03NFUM8Wm6krdbNY:128
google.maps.Load @ js?libraries=places&v=3&key=AIzaSyBxfigMXZZiXMyDL_v03NFUM8Wm6krdbNY:18
(anonymous) @ js?libraries=places&v=3&key=AIzaSyBxfigMXZZiXMyDL_v03NFUM8Wm6krdbNY:216
(anonymous) @ js?libraries=places&v=3&key=AIzaSyBxfigMXZZiXMyDL_v03NFUM8Wm6krdbNY:216
Maybe that helps?
I'm using divi plus toolset, but in Divi I havent added the google api key.
I think it was a problem from divi, it loads a googlemaps api on its own...
My issue is resolved now. Thank you!
Hi Andreas
Could you possibly share the way you resolved the issue?
I have the same problem. It goes away if I deactivate Toolset Maps but that's not a solution as I need it. Deactivating Divi isn't an option either as the whole site is built around it.
Thanks
Richard
Hi Richard, sorry just read now your question.
If you don't need the divi googlemaps api you just can add this snippet to your functions.php
function maps_dequeue_script() {
wp_dequeue_script( 'et_bfb_google_maps_api' );
}
add_action( 'wp_print_scripts', 'maps_dequeue_script', 100 );
I hope that helps you, too
Cheers
Andreas