Problem Importing Province

This topic contains 13 replies, has 4 voices, and was last updated by  Alex Rollin 5 years, 10 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #436390

    Bruce Frantzis
    Full Member
    Post count: 30

    Hi there,

    We are importing contacts on a CSV file and some of our contacts do not have a province. It seems GeoDirectory requires a province to import.

    We have tried to manually find the province (or region / county) on Google Maps, but some addresses do not provide this information.

    Does anyone have a solution?
    How do we import without a province?
    Or how do we find the province for a given address?

    Any work arounds or ideas?

    Thanks, Ryan

    #436393

    Paolo
    Site Admin
    Post count: 31206

    Hi Ryan,

    GeoDirectory requires country + region + city + address for each listing.

    Please provide an example of an address for which you can’t find the region and we’ll help you.

    Thanks

    #436526

    Bruce Frantzis
    Full Member
    Post count: 30

    Hi,

    Thanks for your response. This is Dominic switching over. I’ve attached a list of our addresses that didn’t automatically link with a region code. We have about 200. When entered into google maps none of them have a region code in their address. If you could update that list that would be great. Additionally, if you have a list of accepted regions and the cities that are contained within them, that would be great.

    To give some context, in some cases we can guess the region code by knowing that the UK uses county as region, and Germany uses state, but in many cases in those countries, the region is still unclear, e.g. Britain has Ceremonial and Historical Counties. We also don’t know what the region unit for other countries is used such as Thailand for example. Out list is very international containing addresses from countries all over the world although the most of our list is in the UK and Germany.

    Thanks,
    Dominic

    #436556

    Alex Rollin
    Moderator
    Post count: 27815

    Hello,

    The geocoding features of GeoDirectory call out to Google or Open Street Map. We do not update those databases directly.

    Yes, region is required for import. Taking a look at the spreadsheet it is clear the list could benefit from geocoding. For example, New York (city) is always in region New York (state), London is (afaik) always in Greater London.

    There are several option to get geocodes in bulk from a list of addresses: https://wpgeodirectory.com/docs/core-export/#resources

    The addresses may need to be arranged or concatenated to submit them to various services. Contact a GD Expert if you need help with that: http://geodirectoryexperts.com

    #437381

    Bruce Frantzis
    Full Member
    Post count: 30

    Hi,

    We geocoded the import addresses but still have ~90 that are not importing. Can you tell me why these may be wrong:

    WP DEBUG:

    
    
    [06-Jul-2018 16:17:37 UTC] GD IMPORT LISTINGS [ROW 3]: Could not be added due to blank/invalid address(city, region, country, latitude, longitude).
    [06-Jul-2018 16:17:37 UTC] GD IMPORT LISTINGS [ROW 5]: Could not be added due to blank/invalid address(city, region, country, latitude, longitude).
    [06-Jul-2018 16:17:37 UTC] GD IMPORT LISTINGS [ROW 6]: Could not be added due to blank/invalid address(city, region, country, latitude, longitude).
    [06-Jul-2018 16:17:38 UTC] GD IMPORT LISTINGS [ROW 7]: Could not be added due to blank/invalid address(city, region, country, latitude, longitude).
    [06-Jul-2018 16:17:38 UTC] GD IMPORT LISTINGS [ROW 8]: Could not be added due to blank/invalid address(city, region, country, latitude, longitude).
    [06-Jul-2018 16:17:38 UTC] GD IMPORT LISTINGS [ROW 9]: Could not be added due to blank/invalid address(city, region, country, latitude, longitude).
    [06-Jul-2018 16:17:38 UTC] GD IMPORT LISTINGS [ROW 10]: Could not be added due to blank/invalid address(city, region, country, latitude, longitude).

    SAMPLE DATA:

    
    
    post_city	post_region	post_zip	post_country	post_latitude	post_longitude
    London	The City of Brighton And Hove	NW8 OQG	United Kingdom	51.53805	-0.179737
    New York	New York		United States	40.712784	-74.005941
    Stroud	Gloucestershire	GL6 8NX	United Kingdom	51.758915	-2.140212
    Canterbury	Kent		United Kingdom	51.277269	1.080517
    Brighton	The City of Brighton And Hove		United Kingdom	50.82253	-0.137163
    Schlangenbad	Hesse		Germany	50.092381	8.102423
    Tourne	Occitanie	9420	France	42.983243	1.344138
    Brighton	The City of Brighton And Hove	BNI 7BJ	United Kingdom	50.819522	-0.13642
    Brighton	The City of Brighton And Hove		United Kingdom	50.819522	-0.13642
    Darmstadt	Hesse	64297	Germany	49.87088	8.64565
    
    #437383

    Kor
    Moderator
    Post count: 16516

    Hi Bruce,

    Could you please attach the CSV file so that we could check on it?

    Thanks!

    #437388

    Bruce Frantzis
    Full Member
    Post count: 30
    This reply has been marked as private.
    #437390

    Alex Rollin
    Moderator
    Post count: 27815

    We would be happy to take a look at your settings to see if we can find the problem. I would like to take a look at the CPT configuration. Can you also please attach the demo export of the CPT?

    Please be sure to have completed all the steps for configuration, and do check to see that your plugins are all up to date.

    To allow us to examine the site, please create a private reply and include all the information listed below so we can make a complete diagnosis.

    Name to CPT to import into:
    WordPress Credentials
    WP Admin Login URL:
    WP Admin Username:
    WP Admin Password:

    #437394

    Bruce Frantzis
    Full Member
    Post count: 30

    Sorry, I should have mentioned that I have successfully imported 300+ locations so the configuration is fine. 92 locations failed all for same reason “Could not be added due to blank/invalid address(city, region, country, latitude, longitude)” but looking at the CSV I cannot see what is wrong with the addresses as the first 5 error rows I checked had valid data for the fields indicated.

    Can you see a problem with the data in those fields?

    #437404

    Alex Rollin
    Moderator
    Post count: 27815

    Row 3,5-11 post_address is blank

    #437482

    Bruce Frantzis
    Full Member
    Post count: 30

    Address is not a required field.

    #437512

    Alex Rollin
    Moderator
    Post count: 27815
    #437626

    Bruce Frantzis
    Full Member
    Post count: 30

    Hi Alex,

    You are correct that ‘post_address’ field cannot be blank when importing. I set it to text “NONE” for all rows that did not have it and the import was successful.

    So this is a bug since the plug-in has an option “Location Settings -> Address -> Is required” which is set to “No”. See attached screen-shot. The error message only lists “city, region, country, latitude, longitude” as being invalid/blank.

    The import function should probably be fixed to ignore the ‘address’ field when it is not required.

    #437632

    Alex Rollin
    Moderator
    Post count: 27815

    Ah! Very good! I can see there was a misunderstanding and I am sorry about that, but I am glad you got it working.

Viewing 14 posts - 1 through 14 (of 14 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket