Skip Navigation

[Gelöst] You have included the Google Maps JavaScript API multiple times on this page.

This support ticket is created vor 5 Jahren, 2 Monaten. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Dieses Thema enthält 7 Antworten, hat 3 Stimmen.

Zuletzt aktualisiert von Andreas vor 5 Jahren, 2 Monaten.

Assistiert von: Christian Cox.

Author
Artikel
#1345499

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?

#1345505

... it happens also on other pages, where I'm using toolset and Divi.

#1345627

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.

#1345631

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?

#1345765

I'm using divi plus toolset, but in Divi I havent added the google api key.

#1346117

I think it was a problem from divi, it loads a googlemaps api on its own...

My issue is resolved now. Thank you!

#1348855

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

#1349933

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