Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #56508
    info222
    Participant

    When I try to import a csv of locations none of them will geocode. When I try to force them to geocode I get a failed to geocode error. If I try to run the geocode in bulk I end up getting a 504 error and have to roll my site back to a backup.

    I have double checked my Google Browser Key, I’ve even made a new one. I just can’t seem to figure out whats up.

    I’m on version 4.9.14 of Store Locator Plus and version 4.9.14 of the Store Locator Plus – Power add-on.

    #56510
    Cici
    Keymaster

    Are you saying you could import with an earlier version of SLp and power but cant with version 4.9.14?

    A 504 error is a time out error so it is possible that you do not have a correctly formatted csv file and therefore the wheel keeps spinning. Do you see the downloaded csv file in your media library?
    How large a file are you importing?

    what is your site configuration, php, WP memory , General settings etc? Are you on a shared server? A screenshot of the SLP Plugin information which you can find under the SLP Plugin Info tab is preferable.

    Please refer to importing docs
    https://docs.storelocatorplus.com/blog/importing-large-lists-into-store-locator-plus/

    Refer to additional information about CSV file formats

    https://docs.storelocatorplus.com/blog/csv-import-file-header/

    https://docs.storelocatorplus.com/blog/q-my-locations-will-not-geocode-why/

    https://docs.storelocatorplus.com/blog/power-import-and-wpslp-4-9/

    I cannot look at your site since you have not provided your site url, otherwise I would look to see any Google APi errors You can do this your self by using any browser developer tool and inspect , look under Console. If there are no Google MAP API errors then changing the key is not the answer. If you had a key before it will still work now.

    Here are some other places to look to assist you.
    https://docs.storelocatorplus.com/blog/geocoding-stopped-working/

    #56514
    info222
    Participant

    The last time the client tried to run an import was an old version of SLP and Store Locator Plus :: Pro Pack and it worked. After an update, pro pack was deactivated automatically and they hadn’t tried to do an update since. So we updated their site with the power plugin. That is when this issue started.

    The files I’m trying to import are only 17kb, so that shouldn’t be an issue. They are appearing in my media library. I have also attached a screenshot of the info tab of SLP.

    I double checked the CSV to make sure it matched the example CSVs that I found here:

    https://docs.storelocatorplus.com/blog/example-csv-import-files/

    But none of them had the headers from the post you gave me here.

    https://docs.storelocatorplus.com/blog/csv-import-file-header/

    so I will try that next.

    • This reply was modified 6 years, 7 months ago by info222.
    #56516
    Cici
    Keymaster

    Thanks for letting us know. I am guessing that your server is timing out if the CSV file isn’t in the right format or getting stuck while trying to geocode. Try “skipping: the geocode and getting the file to import first and check the locations to see if they imported the correct fields. You can then go back and check off under the bulk actions to geocode all.
    Other geocoding error messages you may see if they are over the query limit etc.
    https://docs.storelocatorplus.com/blog/geocoding-errors/

    useful information also about that sl_id column and when to use and when to not use it under the duplicate handling in documentation. If the locations do not exist you do not want the sl_id column. If they do exist , do not make up your own.
    How this works

    https://docs.storelocatorplus.com/blog/csv-import-duplicates-handling/

    #56517
    info222
    Participant

    I figured that’s what might have been happening, I just couldn’t figure out why. The good news is with the new headers I didn’t 504 the site. So there’s that.

    I have tried skipping Geocoding on import and it still pops up the geocoding part of the process, but I got it to import just fine. Now all the locations I import say “Inactive. Geocode to activate.” and when I try to geocode it from there I get this.

    If you are having geocoding issues, View the documentation for Geocoding.
    Address #8456 : 204B E 5th St Fulton MO 65251-1717 United States failed to geocode.
    Received status REQUEST_DENIED.
    Received data
    stdClass Object
    (
    [error_message] => API keys with referer restrictions cannot be used with this API.
    [results] => Array
    (
    )

    [status] => REQUEST_DENIED
    )

    Also, thank you for your help on this.

    #56521
    Cici
    Keymaster

    The error message above says it all. You have added a referrer restriction , perhaps inadvertently. I believe Google has added some verbiage that is very misleading for the API key. Their new documentation basically tells you to add a restriction when you go to production. that is NOT desired and will break third party plugins that need a Google API key . I am not sure if they are misleading the public on purpose to drive business licenses or not but they have changed the verbiage in the past few months and I find it misleading..

    get a new key and REMOVE any restrictions. The restriction makes it so you cant geocode, it restricts servers from talking to Google for geocoding. Which in turn makes it so a visitor to your site cant get the location geocoded either. If you do this as Google tells you: “select HTTP referrers (web sites)” the your web server itself, Versus surfing from their own laptops , phones or PC to access your site.

    See STEP 4 under our Getting started guide (I guess I need to make the print larger now that Google has changed their verbiage or actually put STEP 4 in the fore front) it states do NOT add referrer restrictions.
    .

    https://docs.storelocatorplus.com/blog/getting-started/

    I am glad you provided us with that error message

    #56534
    info222
    Participant

    That did the trick!

    Thank you for your help.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘504 error on geocoding’ is closed to new replies.