Listings Import Errors

This topic contains 11 replies, has 3 voices, and was last updated by  vivek 4 years, 8 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #506898

    vivek
    Full Member
    Post count: 246

    Hi,

    I have several times imported listings into some CPTs without facing this error.

    However, today, in another CPT i tried importing a CSV (attached) with 15 listings, and only 1 is showing on the site (Funky Monkies)
    9 others also show in admin, but with location ‘unknown’, and do not show in front end. https://yopune.com/activities-events/

    I tried again with same file, import shows 15 records imported (no error while importing), admin shows 10 more listings (of course duplicated), but only the same one again (duplicate of funky monkey) is showing in the front end.

    The field IDs are matching those from the export file (and one record has fields getting uploaded correctly). Category id has a leading comma, but ive had that in earlier imports also with no issues (that is to avoid thousands separators issue in excel). Even the one row which is correct, has a leading comma in category.

    Can you please advise what is going wrong? This is my dev site, so you may try imports into this.

    Thanks very much,
    Vivek

    #506905

    vivek
    Full Member
    Post count: 246
    This reply has been marked as private.
    #506954

    Alex Rollin
    Moderator
    Post count: 27815

    Please try adding the file to a zip archive and attaching it here so we can take a look.

    Did you already follow our recommended procedure here?

    https://wpgeodirectory.com/docs-v2/geodirectory/settings/permalinks/#404

    #507067

    Guust
    Moderator
    Post count: 29970

    Try saving your imported listings in the backend. You will see they miss required data. That is why they cannot show.

    #507094

    vivek
    Full Member
    Post count: 246

    So, after multiple trial and errors, this is what i understand:
    1. Earlier it was mandatory to provide lat/long while importing listings, else import gave an error. I have earlier put the same lat/long on all listings while importing them, and them opened them one by one, set the lat/long using “Set addr” and saved – that worked fine.

    To avoid manually opening each listing, setting and saving, I discovered an excel utility online which would get the lat/long for the address (checked these to be accurate), and i was trying to import them with actual latlongs. However, as reported above most were failing.

    As advised by Alex above, i revisited the import documentation, and it seems there is a change and now lat/long must be blank while importing and geocoding is done while/after import – earlier blank lat/longs gave error while importing, so this seems to have changed.

    So, as per the documentation- (1) my headers are as per the export file (2) saved csv in open office calc (3) used CLEAN to remove any special characters (4) deleted lat/long from the file (5) category IDs, defualt categories etc seem ok

    Yet out of 15 listings, only 5 are getting added properly. Some show error in geocoding (see attached pic). Others are showing in admin but only the title is correct and no other info, location is unknown, permalink is wrong…

    I am attaching the zip import file. Please do take a look and let me know how to fix this.

    Having done import so many times without any issues, with the lat/long in the import files as earlier, I am really flummoxed with this one…

    thanks very much for your help.

    Vivek

    #507098

    vivek
    Full Member
    Post count: 246

    I had also tried it with the lat/long in the import file. The same 4-5 listings appear properly, while the others are with ‘unknown’ location, no other data.

    thanks, vivek

    #507130

    Guust
    Moderator
    Post count: 29970

    The ones I looked at fail because there is no data in the address field.
    Try saving them to see the error.

    #507138

    vivek
    Full Member
    Post count: 246

    Hi Guust, you are correct that the address field is blank in the ones which did get uploaded, but have unknown location, in fact not only address but all fields except title are blank- the question is why are these fields blank when they are populated in the CSV file?

    So, there are:
    1. some listings in CSV file which are not getting into GD at all
    2. some listings in CSV file which are coming into GD in the correct CPT, but only title shows and no other field, and permalink is also not correctly formed (goes to 404)
    3. some listings in CSV file are properly showing with all data in admin as well as front end ( 4 out of 15 in the CSV)

    thanks, Vivek

    #507144

    Guust
    Moderator
    Post count: 29970

    Listings with unknown locations can not be displayed on the maps.
    It just is not possible to show them somewhere if you do not know where they are.
    You can add anything you like in the address field, but it cannot be blank. For example, you can add “Unknown”, and then add lat and lng and then it will work.

    All of those errors are because incorrect or incomplete data.
    Fix the errors by saving the listings in the backend, and then export the listings.
    Compare with you upload file and you will see all the differences. That should tell you how to correctly import in the future.

    #507152

    vivek
    Full Member
    Post count: 246

    Thanks for your message, Guust. Let me clarify that the CSV has all the ‘street’ data populated for each row. However, the address in admin is appearing blank. It is not blank in the CSV

    Also, for the same addresses which are in ‘street’ field in the CSV, i have been able to get the coordinates for these addresses from Google API using the utility here : https://myengineeringworld.net/2014/06/geocoding-using-vba-google-api.html , so i suppose google is able to find these addresses.

    I tried to import the CSV with lat/long populated in the CSV (which i had got from the above utility), but that also doesnt work.

    #507160

    Guust
    Moderator
    Post count: 29970

    Compare the columns: they do not match with your export file.
    You do not have “contactpersons” or “business_hours” column in your import file.
    And in the import file, you have columns that do not match any custom field, for example “image_test”.

    It looks like you are not using LibreOffice or OpenOffice, because some fields are containing “invalid” characters. For example, see the image attached.

    The street addresses you are importing are not street addresses only, but contain the full address including city, region and post code.
    The “street” field should only contain the street address.

    Try importing using a correctly formatted CSV file.

    Thanks

    #507173

    vivek
    Full Member
    Post count: 246

    Thanks so much, Guust – really appreciate this.

    I did save the csv in open office calc, after using the CLEAN function in Excel, but i see a couple of special characters still have come in – have to figure out how to get rid of these.

    Probably the street address including the city, zip also, as well as the missing optional fields may not be the culprit as these were the same even in the listings which did get successfully imported

    Thanks again – i realise this is a data issue and i need to sort this out, was just concerned if there may be a geocoding issue which was causing some listings to not be recognised and hence location showing as ‘unknown’.

    Will work on the special characters and check again – thanks, again, you guys are fantastic!

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

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

Open Support Ticket