Skip Navigation

[Resolved] Google Maps was working. Now it isn't.

This support ticket is created 3 years, 2 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: Africa/Casablanca (GMT+01:00)

This topic contains 7 replies, has 3 voices.

Last updated by nicoleR-3 3 years, 2 months ago.

Assisted by: Jamal.

Author
Posts
#2177815

Tell us what you are trying to do? I'm not sure why Google Maps is no longer working. It was working when I first set it up and there are even stats in the dashboard of Google Cloud. But then at some point it stopped working. I went through the steps again to configure an API and added it and I get the message in Toolset settings that the API has been configured properly, but on the front end there is this message:

"Google Maps Platform rejected your request. You must use an API key to authenticate each request to Google Maps Platform APIs. For additional information, please refer to hidden link"

I also followed the instructions at the "no-account" URL, but still nothing.

I also have a second question. When I was first setting up the distance filters I was unable to check the "Distance center is set from user location" and I was told it was because the site wasn't using SSL at the time because it was a dev site. Now the site is live and I am still unable to check that option. We would like to be able to filter by the user location, but the default option that is checked is "Distance center is set using URL parameter:" Will that affect if someone enters their address and clicks submit to get results in their area?

Is there any documentation that you are following?
https://toolset.com/forums/topic/google-maps-api-not-working/
https://toolset.com/forums/topic/maps-not-working-5/
https://toolset.com/course-lesson/creating-a-maps-api-key/

Is there a similar example that we can see?

What is the link to your site?
hidden link

#2178273

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi there

Would it be possible to get access to your site, which would help us determine if the problem is with the API key or something else.

We can also look at the user location issue.

I will mark your next reply as private so that we can get log-in credentials from you—you may want to create a temporary admin user for us to use that you can later delete. And be sure to have a current backup of your site.

Can you also confirm the url of where we can see the problem.

#2179431

The page seems to generate an iframe for the map, but without the API key. Check this screenshot, no API key before the "&" symbol: hidden link

Checking the page HTML, it seems that you have used a map widget from Oxygen Builder, I am not sure. I could not find where the map was defined. It is not defined in this content template, and I can't edit it with Oxygen Builder
hidden link

Can you tell me where this Map is defined on the backend? Is it in an Oxygen Builder template, or in a Toolset template? Can you share a direct URL so, I can check how it has been built?

#2179437

I also checked your website against one of our API keys. For both API keys, the map on the front end did not work. However, for the backend, on the settings page, the map only worked with our API. With your API, we get this error on the browser console. Check this screenshot hidden link

js?libraries=places&v=3&key=AIzaSyA4PEJdV0OUYWhGD05metUFBkVMEDBDhDk:82 Google Maps JavaScript API error: RefererNotAllowedMapError
<em><u>hidden link</u></em>
Your site URL to be authorized: <em><u>hidden link</u></em>

It seems that you must add your website URL to the authorized sites. You will need to add your domain in Google Console configuration. Or, you can create a second API. It has to be server only API and add it to Toolset->Settings->Maps, in the second API input.

Before checking the frontend map, we need to get this backend map working first. Then we can check the frontend map.

#2179539
Screenshot 2021-09-25 at 08-21-28 Oxygen Visual Editor - Trainer Profile - Dressage Connect.png
Screenshot 2021-09-25 at 08-17-11 APIs Services – APIs Services – Dressage Connect – Google Cloud Platform.png
Screenshot 2021-09-25 at 08-16-48 Restrict and rename API key – APIs Services – Dressage Connect – Google Cloud Platform.png
Screenshot 2021-09-25 at 08-10-01 Restrict and rename API key – APIs Services – Dressage Connect – Google Cloud Platform.png
Screenshot 2021-09-25 at 08-14-14 Credentials – Google Maps Platform – Google Cloud Platform.png
Screenshot 2021-09-25 at 08-15-09 Credentials – Google Maps Platform – Dressage Connect – Google Cloud Platform.png

I tried to add the url per their instructions setting in there, but I changed it to .dressageconnect.com/* as explained in their directions, but when I do that, I now get a message when I check the API in Toolset settings that says: "REQUEST_DENIED - API keys with referer restrictions cannot be used with this API."

So instead I tried to set it to the numerical URL and when I check API in the Toolset settings, it says "Google API seems to be configured properly."

As far as I can tell, I've done everything in the Google Console that the directions specify. I've added some screenshots from the Google account. In the dashboard screenshot, you can see at one point, it was working. But then it just stopped and I have no idea why. So I went ahead and created a new API a couple days ago, as you can see. But that one also isn't working.

As to the embed in the page, the template is set up with Oxygen and the iframe references the Toolset field for Address.

#2179619

Please check the screenshot Screenshot_2021_09_25_at_08_10_01_Restrict_and_rename_API_key_APIs_Services_Dressage_Connect_Google_Cloud_Platform.png
I believe you should have "*.dressageconnect.com/*" and "dressageconnect.com/*"(without the double quotes) instead of ".dressageconnect.com/*"

Use the IP restricted API from your screenshot Screenshot_2021_09_25_at_08_16_48_Restrict_and_rename_API_key_APIs_Services_Dressage_Connect_Google_Cloud_Platform
on the second input in Toolset Settings. Check this screenshot hidden link

I still can't say if the map is from Oxygen Builder as I don't see it from the backend. The screenshot is, unfortunately, not enough for me to understand how the map is being added. I assume that you updated it in a template here hidden link
Can you share a URL where I can see the map? I mean, where the map is added, so I can inspect its configuration?

Assuming that the map is from the Oxygen Builder, and assuming that it needs to Maps Embed API(from screenshot Screenshot_2021_09_25_at_08_17_11_APIs_Services_APIs_Services_Dressage_Connect_Google_Cloud_Platform.png)
That is not enough for Toolset Maps. You will need to activate the Maps JavaScript API too.
https://toolset.com/course-lesson/creating-a-maps-api-key/

Please note that you might need some time(a few to 30min) for the Google Console configuration to be propagated on the internet.

I hope this will help, at least fix the map in Toolset Settings. Looking forward to your reply.

#2179675
Screenshot 2021-09-25 at 11-31-28 Maps JavaScript API – APIs Services – Dressage Connect – Google Cloud Platform.png

You can see how the map is embedded on this page: hidden link

For some reason, I am not able to see your screenshots. That Lightshot page is not working for me. I keep getting a Recaptcha test and then I don't see anything or the page looks broken. I've tried in a couple different browsers.

It looks like the Maps JavaScript API is activated.

#2179807

We were able to figure this out somehow. I'm not sure how, but I think it's because we figured out how to register/authorize the domain. And I fixed the Oxygen issue by also adding the API in their settings. Thank you for working through this with me. My issue is resolved now. Thank you!