CSV Import problems

This topic contains 31 replies, has 9 voices, and was last updated by  Stiofan O’Connor 8 years, 9 months ago.

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

Open Support Ticket

Tagged: 

  • Author
    Posts
  • #10932

    Mike McClellan
    Free User
    Post count: 10

    I am trying to figure out the CSV import function. I downloaded the sample file and have filled it out to the best of my knowledge using open office Calc. I tried to import it with just a single listing to make sure I was doing it right, but I get the following error:

    0 record(s) inserted.
    1 out of 1 record(s) could not be inserted due to invalid/blank post type. Only use geodirectory’s post type.

    I left the Video, Twitter, and Facebook fields empty because they do not have those. I used full paths for the photo file names.

    I have attached the import file. Could someone take a look at it and let me know what is wrong?

    Thanks,
    Mike

    #10940

    Simone
    Expired Member
    Post count: 3515

    Hello, the post_type column should reflect the name of the post type you have in your website (you can see here http://www.yourdomain/wp-admin/admin.php?page=geodirectory&tab=geodir_manage_custom_posts)

    Default post types name are gd_place and gd_event

    #10956

    Mike McClellan
    Free User
    Post count: 10

    Okay, I changed the post_type to gd_place, which is what is shows on my Geo Directory General tab. (I just used the default). When I saved the file and tried the import again, I still get the same message. I have attached the new import file.
    Thanks,
    Mike

    #10959

    Simone
    Expired Member
    Post count: 3515

    Do you have, in GeoDirectory->Custom Post Type for the same post_type you just entered in the csv?
    Also check the Category, you must create a category in the custom post type and then enter the SAME in the csv column.
    Also for the images, just insert the filename, and place the image in /wp-content/uploads/2014/08/

    For documentation, please see here

    #10960

    Mike McClellan
    Free User
    Post count: 10

    Okay, I figured out why I got the second import error. There was an extra space after gd_place. I removed that and it imported the file. However, there are still some problems:
    There is no title.
    There is no category.
    It set the address to “Carretera Federal 2”, which does not even exist in the import file.
    It set the Country to Mexico instead of United States.
    It set the city to Rancho in stead of San Diego.
    and None of the photos are visible. ( I see that it automatically assigned the upload folder to the photo, but I had given the full path to the files that were already there in the import file like I do with another import program I use. I guess I only need the photo file name and let it assign the path to it.)

    I’ve got about 300 records to import, so I really need to get this figured out. Is there any more detailed documentation or can someone let me know what I’m doing wrong?
    Thanks,
    Mike

    #10961

    Simone
    Expired Member
    Post count: 3515

    Hmmm…did you read my previous message? 🙂

    #10972

    Mike McClellan
    Free User
    Post count: 10

    Sorry, I was writing my message while you were writing yours and I didn’t see it until after I had made my post. I will check it out.
    Thanks,
    Mike

    #11044

    Mike McClellan
    Free User
    Post count: 10

    Okay, so I have gotten it to import okay except for two issues. It does not set the post_author or the post_category.

    I used the Username for the Author and tried both the regular category name and the category slug, but neither worked. Does the USER ID have to be the WordPress ID number, and if so, where do I find that? I don’t see it displayed anywhere on the user screen. I’m not sure what else to try with the category.
    Thanks,
    Mike

    #11051

    Mike McClellan
    Free User
    Post count: 10

    I guessed the user ID number and got it to import that okay. However, I am still not getting the category to import. I have attached the import file and a screen shot of my categories page. Hopefully you can spot the error.
    Thanks,
    Mike

    #11062

    Simone
    Expired Member
    Post count: 3515

    Your category must be the same name (not slug) of the one on your website, so Relocation Specialist . You can add multiple categories with a comma (example Category1, Category2).

    #11076

    Mike McClellan
    Free User
    Post count: 10

    Okay, by using the actual category name I was able to get it to import. I was struggling with the photos though. I found that if the photos are uploaded prior to importing the listing, the photos display as a ghost photo. If I do the import first and then upload the photos, it works fine.

    The other problem I had was that Calc would drop the last 0 in the post_latitude and post_longitude and it would confuse the location. I had to change these fields to text instead of numbers and that corrected the problem.

    I didn’t get this from the documentation, so you may want to add that bit of information for the future.

    Thanks,
    Mike

    #12121

    Evan Burrows
    Buyer
    Post count: 18

    Where can I find the category table in the database?? I have like 40 categories I need to switch over to the live site.

    #16077

    charlievaughan
    Lifetime Member
    Post count: 70

    I’m also having problems with upload. I’ve downloaded the sample CSV, changed the address to match my default location (now passes address validation) also changed category to “Hotel” (already added the dummy data).

    But despite only making a few changes to the example CSV I also get “3 out of 3 record(s) could not be inserted due to invalid/blank post type. Only use geodirectory’s post type.”

    I’ve only got the default “gd_place” post type, its the same in the CSV and no additional white space.

    I’m using the latest version of WordPress and your plugins.

    What else can I try?

    #16079

    charlievaughan
    Lifetime Member
    Post count: 70

    After posting that comment and checking the attachment I can see the my CSV is mangled.

    I’ve created a new copy using Microsoft Excel 2008 for Mac and its working, with the geocode data and phone number working correctly.

    It looks like my CSV from the latest OpenOffice might have been the problem (although I validated it online).

    Maybe if the CSV upload documentation detailed what settings to use when opening the file in OpenOffice that might help?

    #16080

    Simone
    Expired Member
    Post count: 3515

    I was about to write you just now, OpenOffice seems to alterate the document. I’ve made tests with different editors now, to try to fix your issue and I discovered that OpenOffice is the issue (I always used Apple Numbers till now).

    you post was useful 🙂 I will notify Stiofan

Viewing 15 posts - 1 through 15 (of 32 total)

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

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount