This support ticket is created Il y a 3 années et 7 mois. 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.
Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.
I am setting up the Google Maps credential for the API on Google Cloud Platforms. It's been a while since I did this.
My understanding is that for security reasons one should restrict to the web address of the site but when I do this and click the check API button I get the following warning:
REQUEST_DENIED - API keys with referer restrictions cannot be used with this API.
If I set restrictions to none everything works fine.
I'm assuming here that the API key would work in there wasn't any domain restrictions. If you have not tested this then you can go ahead and remove the API domain restriction and let me know if you are able to successfully validate with the API without the domain restriction.
If it works then I would recommend going through the document below for the acceptable formats. lien caché
I would recommend just adding your URL like this lien caché
I followed your suggestion and used lien caché under HTTP referrers. And following the instructions from the documentation I set up all the variants as you can see in the image uploaded.
Looking at another site that I set up previously MacGabhainn's hostel the following works with the Divi Map Module so I am not sure why this isn't working with Toolset?.
I did wait 5 minutes, as suggested above the Save button on cloud platform settings page.
The only option is to use no restrictions but that isn't secure.
It seems to have started working for some reason. Perhaps it was one of many clicks on things on the Cloud Platform site that corrected the issue but for the life of me I couldn't tell you what that was.
Happy to see that it is now working. It could be that it was caching or something of sort. I cannot give a clear answer on what happened here given that I'm not able to debug. However it could be caching with the URL being sent to verify on the API.
However if there are any issues please let me know.
After a good night's sleep and reviewing the issue I was experiencing, I see that even if the following is displayed the maps still work.
REQUEST_DENIED - API keys with referer restrictions cannot be used with this API.
So the trick is to set up in Google Cloud Platform without referrers, click Check API, confirm it works and then set the referrers.
Can I make a suggestion that the display of this message be changed as it is disconcerting and suggests that the maps will not work. I spent too much time experimenting with this.
Also thanks to the suggestion you posted last week for someone else regarding Divi and turning off Enqueue Google Maps Script is settings to get the Map Block working.
Can I make a suggestion that the display of this message be changed as it is disconcerting and suggests that the maps will not work. I spent too much time experimenting with this.
Suggestion taken, however this could be a one off case as i've handled ticket previously where the URL wasn't validating and after checking their API settings and their URL format they were able to get the validation success message.
I'm unsure of the cause it your case, however based on your response the API is working correctly. Can you also confirm that on the page that the map is being displayed that there is no Notice in the Javascript console for chrome regarding the Google Maps API ?
The maps are loading fine and the only warnings I am seeing in Console are the following:
DevTools failed to load SourceMap: Could not load content for lien caché: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for lien caché: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for lien caché: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
No mention of anything Toolset, only the Divi framework and map.js relevant to another type of map, coding possibly and not the one we use to navigate with?
I'm happy at this stage but if you need me today into this more let me know.
The maps are loading fine and the only warnings I am seeing in Console are the following:
DevTools failed to load SourceMap: Could not load content for lien caché: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for lien caché: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for lien caché: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
No mention of anything Toolset, only the Divi framework and map.js relevant to another type of map, coding possibly and not the one we use to navigate with?
I'm happy at this stage but if you need me to dig into this more let me know.