Skip Navigation

[Resolved] Maps are *sometimes* reporting "This page can't load Google Maps correctly

This support ticket is created 2 years, 3 months ago. 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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 5 replies, has 2 voices.

Last updated by cantonB 2 years, 3 months ago.

Assisted by: Waqar.

Author
Posts
#2457737

Note that this page loads up a toolset view map fine:
hidden link

However this one does reports "This page can't load Google Maps correctly":
hidden link

There is very little difference between the two map views. I've double-checked my google API keys, and they seem fine.

I did notice that on the working map (hidden link) if I remove the [wpv-filter-controls] (filter by distance) then that map breaks and starts throwing the "This page can't load Google Maps correctly" error as well.

Can you think of some reason that I'm required to set up [wpv-filter-controls] ? This is problematic because in the second map, I'm outputting users (instead of posts) which prevents me from setting up [wpv-filter-controls].

#2458021

Hi,

Thank you for contacting us and I'd be happy to assist.

The "[wpv-filter-controls]" shortcode is available even in the views which don't have any front-end search filters, so you don't really have to remove it from the "Search and Pagination" section.

I suspect that some third-party plugin or the active theme is also loading the Google Maps API, which is resulting in the error.

In the browser's console of the page which is showing the map correctly, you'll see this error in the browser's console:


You have included the Google Maps JavaScript API multiple times on this page. This may cause unexpected errors.

But in the browser console of the page where the map is showing the popup warning, you'll see this warning:


Google Maps JavaScript API warning: NoApiKeys <em><u>hidden link</u></em>

As you've confirmed that the Googles Maps API key is properly set in the Toolset Maps settings on both these websites, it could be that the API key is not saved in the second source's settings on this other website, which is resulting in this warning.

I'll recommend checking the settings of all other active plugins and the theme and making sure to disable any option to load the Google Maps API key, as Toolset is already loading that.

I hope this helps and let me know how it goes.

regards,
Waqar

#2458651

Hello,

Thanks for looking into this! However I don't think this problem has to do with the two console errors you mentioned because, in fact, the page that *works* is the one that shows both of these errors.

Here is a better example of the mystery I'm trying to solve. Consider these two pages, both on the same website:

hidden link
hidden link

One of them works fine, the other one throws the "this page can't load google maps correctly" error.

The only difference between the two views is that one of them includes the location filter.

Why am I obligated to add a location filter in order for the map to load properly?

#2459085

Thanks for writing back.

The location filter is not obligatory and I couldn't reproduce this behavior on my test website.

Can you please share temporary admin login details of this staging website, so that I can see how these views are set up?

Note: Your next reply will be private.

#2462121

Thank you for sharing these details.

Here are the steps that I took to investigate this:

1. When I checked the page with the map view filter, it was showing the map fine. But the page without the map view filter was showing the error message on the map "This page can't load Google Maps correctly."

2. I deactivated the "Calendarize it! for WordPress" plugin and both pages, started showing the map correctly, without any error message.

3. I activated the "Calendarize it! for WordPress" plugin and the issue reappeared on the page without the map view filter.

4. I then copied the Google Maps API key used in the Toolset Maps settings and pasted it into the settings of the "Calendarize it! for WordPress" plugin and now both pages are showing the map correctly.

Except for the changes mentioned above, I haven't made any changes to the website.

I hope this helps and please let me know if you need any further assistance around this.

#2462157

My issue is resolved now. Thank you!