November 13, 2016 at 6:24 am #17081
Mappress is no longer able to automatically generate maps for new or updated posts on our site. We’re on 2.44 Pro. Automatic maps were working till a week or so ago, when we updated the plugin and some other things on the site. We’re able to generate maps manually for each post. In the mappress_errors custom field, we see this:
google : Invalid status: REQUEST_DENIED, address: Buckingham+Palace%2C+London%2C+SW1A+1AA
- Our site is running on PHP 7.x
- We appear to have have a valid API key.
- We see the sample map on the MapPress settings page.
- We’re able to generate maps manually on each post by entering a postcode and address, searching for it, and saving it.
- No change to the type of custom post.
- We’re using the same API key under ‘Browser API key’ and ‘Server API key’ Mapress fields on the settings page, since Google’s API console is no longer offering a choice of browser or server (for our account, at least) and leaving one of the keys out generates prompts a warning dialogue after saving the settings, and prevents the sample map appearing on the settings page.
- The address are generally all UK addresses so we’ve tried specifying https://maps.google.co.uk as the map server, ‘uk’ as the country code and ‘en-GB’ as the language but those things appear to make no difference.
- We’re currently telling MapPress to use a bunch of custom fields for geocoding (mappress-address-line-1, mappress-address-line-2, mappress-city, mapppress-postcode). These are long unchanged and used to work fine but, to test things, we simplified to using just post code – no change to the error message when we create a new post or save an updated post.
- We have always had the setting to ‘overwrite existing maps when updating’ enabled.
Any ideas gratefully received!
BahiNovember 13, 2016 at 6:24 am #17082
PS. MapPress has been working fine for us on PHP 7.x for some months.November 13, 2016 at 6:28 am #17084
Here’s some things to check:
1. You need two API keys: one for the front-end (‘client’) and one for geocoding (‘server’). The server key is secured by IP address instead of the referring domain. Make sure both have been set up in the Google control panel and in the MapPress settings screen.
2. Make sure your project has the geocoding API enabled in the Google control panel.
3. Check your usage – Google’s free geocoding limits are small, I think around only 2500 locations.
If the above don’t help, feel free to use the contact form to email me a login and I’ll see if I can find the problem.December 16, 2016 at 7:06 am #17129
Same problem here, I can manually generate a map on a post by entering the address. Those requests get a success in the Google API.
When generating the map using Custom Fields is when then error occurs.
So I’m wondering if the request is not being formed correctly when sending using custom field data.
As per shootraw, was working fine for several months, then stopped working.
I checked the above suggestions, I was all clear.
Anything else you can think of that I should check?
CheersDecember 16, 2016 at 7:08 am #17130
I can’t really add anything based on that information. But if you’d like, you can use the contact form to email me a login and provide an example.
Also, as I mentioned above: please be sure you’re using a separate server key, and don’t restrict it by IP for your initial testing.December 16, 2016 at 10:33 am #17131
Chris thanks for the quick response. I went in and removed the IP restriction on the server key. That fixed it. I’ll see how it goes with quota and such but it would be nice to use that feature just in case.
You must be logged in to reply to this topic.