[Resolved] Address field added but no map shown (backend)
This support ticket is created 5 years, 5 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.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
Link to a page where the issue can be seen: hidden link
(But nothing to see here, as problem in backend)
I expected to see: An option to add an address and a map to pinpoint location. But I only see a text field. When I enter the address nothing changes (no map).
Instead, I got: Just a text box as in screenshot attached
I receive the message: Google API seems to be configured properly. (in green)
Just underneath, under 'Map styles' it shows a grey block where a map example should presumably be shown with:
Sorry! Something went wrong.
This page didn't load Google Maps correctly. See the JavaScript console for technical details.
Chrome console says:
Google Maps JavaScript API error: RefererNotAllowedMapError hidden link
Your site URL to be authorized: hidden link
I've checked the PHP version being used, PHP 7.1.29.
I have set up a second brand new WP installation on the server, and get exactly the same problem.
If you would like access to this, please confirm.
Google Console still reports #RefererNotAllowedMapError even though the key is set up and entered into settings. Again when I click the 'Check API' button it returns 'Google API seems to be configured properly.'
Ok great - that means your Google API key is configured properly but there might be the chance that there is a conflict with the third-party plugins you are using or theme.
To ensure whats causing the issue:
Could you please try to resolve your issue by deactivating all third-party plugins as well as the default theme to check for any possible conflicts with any of the plugins or themes?
Can you please share problem URL where the map field is not working.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).
I have set the next reply to private which means only you and I have access to it.
I have resolved this but I don't quite understand 100% how...
I guessed the problem was with the API Key flagging up as an invalid referrer in Chrome Console, (both websites).
I removed the Application Restriction for the API key which was set to IP address 89.145.78.0. I double checked this and this is definitely the IP address for both websites I've had the problem with (on the same server).
Since removing the IP restriction, the Maps field in WP is now functioning correctly.
But why would adding the IP restriction do this? I don't want to run an API key without restrictions, for obvious reasons.
Well - I'm glad that you found a solution and it was not Toolset but some IP restrictions added to your site.
This is a more related question to Network admin or your server security expert. I would suggest please contact them for IP restriction related questions.