Loading the Google Maps JavaScript API without a callback is not supported

Hi there,

Having trouble with Google Maps loading in a page. Console throws the following error:
Loading the Google Maps JavaScript API without a callback is not supported

Looking at the URL called for the maps script, the URL is:
https://maps.googleapis.com/maps/api/js?v=3&key=AIzaSyBgTVz9o_9ayBXGyQJVghL8cis1MXevxhM&ver=8f1433accfa06d7f4ca0e8f8ba3667fa

Indeed it does not contain the ‘callback’ key-value here. Can someone explain what’s going wrong?

Original page URL: https://corekees.com/projecten/project-pongamia/

Thank you!

Hi @skndal,

Thanks for reaching out.
It is not clear how you are integrating the Google Map. I would suggest you use the Map element which only requires the API Key. Please go through the following article on the element.

Hope it helps.
Thanks

Hi @tristup I am indeed using the Map element. API key is valid. Again, the issue is with Google Map javascript API which is called by the theme. Could you help troubleshoot?

Hi @skndal,

In that case, we need to investigate it through the WordPress admin dashboard. I would suggest you please provide login credentials for your site in a secure note to examine it further, including:

– WordPress Site URL & Login URL
– WordPress Admin username/password
– Specific page where you have added the Map element

To create a secure note, click the key icon underneath any of your posts.

Thanks

Hi @tristup , I’ve attached it to this message. Please let me know what your findings are, thank you very much!

Hi @skndal,

I have checked the same API key in the local environment and the Map loads perfectly fine with the callback error in the console. I have checked it again by adding only the Map element in a Test page but it didn’t work, it seems that there are some other reasons behind your problem. I would like to suggest troubleshooting the following common issue to help us to recognize the reason.

  1. Theme Related Issue
  2. Plugin Conflict
  3. Theme Update related issue
  4. Child Theme Related issue
  5. CSS/JS Customization
  6. Disabling Cache
  7. Disabling CDN

If you discover that an issue is coming from a custom code or 3rd party plugin, kindly consult with a developer or contact the plugin author. Please note that we do not provide support for custom codes and 3rd party plugins.
If that does not help, please copy your live site to a staging server so we could troubleshoot freely without breaking your live site.
And give us access to the secure note including:

– WordPress Site URL & Login URL
– WordPress Admin username/password

To create a secure note, click the key icon underneath any of your posts.

Thanks

Hi @tristup thanks for validating this. Just one question: did you check the API key in a local environment on 6.1.5 or 5.1.5?

The client is currently on 5.1.5 stable because of the breaking CSS and UI changes in Pro v6. Can you confirm the Maps element works fine in 5.1.5? Or suggest a mitigation or workaround of this is not the case?


Please have a look at the same page on https://staging23.corekees.com/projecten/project-pongamia/

I’ve removed all the superfluous plugins, removed google tag manager, removed tons of redundant php, css and javascript, basically sanitized it all down to the page bare essentials. I even resolved the Maps JS API callback issue. It is however running on Pro 5.1.5, but aside from that, no more browser console errors. And still no working Maps (still does not load).

Hey @skndal,

Please provide the Authentication details for this screen as well:

Thank you.

Hi @ruenel, apologies, updated the secure note

Hello @skndal,

Using your Map settings, the map is displayed without any issues on my local testing server with Pro 5.1.5.

Screenshot 2023-03-06 at 10.27.13 AM

Screenshot 2023-03-06 at 10.28.47 AM

Hope this helps.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.