Store Locator Plus® for WordPress Forums Store Locator Plus Geocoding Fails (But Works From Server Command Line)

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #57909
    martin3
    Participant

    The problem: I can add a location, but it fails to geocode. The message is “hit the Google query limit”. BUT, if I test from the command line (using wget) on the same server, using the same API key, it works. Which suggests the ‘query limit’ error message is spurious..?

    This is a new but fully active, upgraded Google Cloud account with no additional limits imposed, no restriction on the geocoding key and nothing else is using the account. It’s a new install (dev setup for a client) of the latest version of the Store Locator Plus plugin. On a VPS where nothing else is using the maps api.

    I’m not getting anything in the WP or server error logs.

    Interestingly nothing appears in the Google api metrics report for the failed geocode attempts (that seems odd)..? The only requests showing in the metrics are the few command line requests we put through – so we can’t really be hitting any query limits?

    As a last ditch attempt I tried removing the geocoding key, and just using the browser key (with all restrictions removed). This gives the same ‘query limit’ error (and no request shows in the metrics report).

    Are there any other api dependencies to get geocoding working in the plugin?

    If it works from wget on the same server, what could the problem be?

    Attachments:
    You must be logged in to view attached files.
    #57913
    Cici
    Keymaster

    We cannot provide details assistance without a site url. We had a customer write in about a similar issue and found that he was using an old Google API key that they had added multiple projects to.  if your “project” on your dev site is not added to whatever the API key you could run into issues

    You need to review the google docs and work with them on it if you have set up the Google keys correctly (see our docs with keyword Google API)    You can set query limits in the new plans but they do not work the same as the old plans that may have had limits

    The developer and SLP team have written many news articles about this and other suggestions.

    #57914
    martin3
    Participant

    But as I said this an entirely new Google cloud account – so these are new keys created specifically for this project – nothing else uses them or even that account.

    Surely if there was any problem at all with the key then it wouldn’t work using that key from the command line either… right..?

    #57916
    martin3
    Participant

    For info – I tried a different plugin (‘WP Store Locator’), using the same keys and geolocation works. So I changed back to SLP but get the same ‘Google query limit’ error. Immediately switch to WPSL again and it works..!

    I think that conclusively proves that the error message from SLP is actually wrong :-). This is definitely not a problem with query limits or keys.

    Is there any more detail I can provide that will help resolve it?

    #57917
    Cici
    Keymaster

    You are referring to geolocation in last post.  First post you mention geocoding..

    Do you have a restricted Google MAPS Javascript API key or unrestricted?  Are you copying the browser MAps API key in the field called browser or in the geocoding field.

    Perhaps you copied the keys in the opposite fields?

    There are no problems with it working  on my site… also no problems with our MYSLP customers, I cannot venture to guess what your specific issue is.  without more info cannot assist you with your setup.

    Sorry bout that

     

     

     

    #57918
    Cici
    Keymaster

    You might want to try  out the MYSLP plans if you are having issues with the key and billing and various Google APIs on your new site.

    Depending on how many locations and what additional features you are using the plans start as low as $5 a month

    https://docs.storelocatorplus.com/home/base-plugin/

    #57919
    martin3
    Participant

    > You are referring to geolocation in last post.  First post you mention geocoding..

    I meant geocoding.

    > Do you have a restricted Google MAPS Javascript API key or unrestricted?

    If it works from the command line, and from another plugin (both on the same server/domain) that rules out any kind of key restriction being the cause of the problem – wouldn’t you agree?

    >Are  you copying the browser MAps API key in the field called browser or in the
    > geocoding field.

    The browser key is in the browser key field, and the geocoding key in the geocoding key field :-). And as I said, I also tested with just a browser key (completely unrestricted). Both gave the same spurious error message.

    > Perhaps you copied the keys in the opposite fields?

    No, definitely the right way round.

    > There are no problems with it working  on my site.

    That’s great. But it doesn’t work here. And if I hadn’t taken the time and effort to report it here, you’d never know there was a problem (and don’t know how many other people tried the plugin, had the same problem and just moved on without reporting it).

    > without more info cannot assist you with your setup.

    As I said – “Is there any more detail I can provide that will help resolve it?”

    But if you’d rather I just move on, I can do that too.

    #57931
    Cici
    Keymaster

    The reason for  all the questions: Your initial post said there was an error  about Google query limits. That has   only  been reported by one other customer who it turns out  had multiple  Premium plan APIS  (pay as you go) as part of the old system. and there are different rules about those migrations and it does not appear to be a simple “take out a new project”

    Google has support instructions specific to those plans.

    https://developers.google.com/maps/premium/new-plan-migration

    And the magic date was Nov 1 2018… Google states Starting November 1, 2018, Premium Plan customers will be able to migrate to the new Google Maps Platform pricing plan once their current Premium Plan contract expires. Only contracts whose end date is November 1, 2018, or later, are eligible to be migrated to Google Maps Platform. Contracts expiring prior to that date must be renewed on Premium Plan.

    The reason I said without  more info is because I do not know how many projects you have , if you were a premium Plan customer of Googles before and you blacked out the site url

    Thanks for letting us know it works on other plugins, I have reported it to the developer.You have provided us as much info as you could.  I am sorry I was not able to help you.

     

     

     

     

     

     

    #57937
    Lance Cleveland
    Keymaster

    Google uses the OVER_QUERY_LIMIT response for this message as well:

    Keyless access to Google Maps Platform is deprecated. Please use an API key with all your API calls to avoid service interruption. For further details please refer to http://g.co/dev/maps-no-account

    Piss-poor design on Google’s behalf, but the bottom line is that Google is not receiving your API key in the request.

    That indicates you have either not set your Google API key properly under Store Locator Plus | General | Server or you are running code on your server that is mangling the URL request we send to Google.

    Re-check your settings and make sure you are using only the Google Browser Key or using both keys with proper API security credentials.

    Since you are talking about “geocoding requests” it is likely you are referring to adding a location via the admin side of things.  If that is what is not working then your PHP code is being mangled in some way.    If you’ve somehow “customized” Store Locator Plus either directly or via the multitude of hooks and filters that could be part of the problem.   If you’ve not done that but have ANY plugin or theme that is modifying the build-in WordPress URL retrieval methods that could also be the problem.

    Since you know how to use command line you should be able to run a network monitor and watch for the Google Maps API request that is going out from your server to figure out what it is being changed to.

    The standard Store Locator Plus URL format which is Google’s official URL as of 2017 should look like this:

    https://maps.googleapis.com/maps/api/geocode/json?language=en&key=<your-valid-google-api-key>&address=<address-to-be-geocoded>

    The key and address fields will be valid text not the <> placeholder shown.

     

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.