Import Issue – Missing fields

This topic contains 31 replies, has 2 voices, and was last updated by  Guust 2 months ago.

  • Author
    Posts
  • #462825

    Kai Liu
    Expired Member
    Post count: 368

    First time importing data to GDv2, I subtract 100 records as testing data and import to GDv2. I found that Phone and Business Hours were not imported into GD database. Please see screen shorts of database and source CSV. I use GDv2 import CSV sample file as template to produce CSV

    Please advise

    Thanks

    Sam

    #462829

    Guust
    Moderator
    Post count: 25358

    The sample download does not have the fields you are using, because you have activated other fields etc.
    You should download your existing listings in a CSV to get the correct CSV format.
    “Timing” and “contact” most likely needs to be “business_hours” and “phone”.

    Let us know. Thanks

    #462830

    Kai Liu
    Expired Member
    Post count: 368

    Thanks Guust,

    Do you mean that we have to use identical field names to work?

    Source csv use email and website instead of geodir_email, geodir_website and they were loaded without issue.

    Strange that the listing sample using phone, contact was doenloaded from your website too whrn I decide to use V2 for current project, because i want to reconfirm if any difference between v1 and v2. I was thinking you have simified the field names somehow.

    Please confirm

    #462831

    Kai Liu
    Expired Member
    Post count: 368

    Anyway, will rename csv fields and try again

    Cheers

    #462834

    Kai Liu
    Expired Member
    Post count: 368

    Hi Guust,

    I have tried. It is event worst, more fields were missing. Please see screen shot

    please advise

    #462838

    Guust
    Moderator
    Post count: 25358

    Export your existing listings. That will give you the correct format, see image.

    Fieldnames must be an exact match, and the order of the columns should be left as per export.

    Attachments:
    #462843

    Kai Liu
    Expired Member
    Post count: 368

    That means the sample csv is not correct?

    Can you confirm if csv requirement is different between GDV1 and GDV2? I have projects in both versions and will share partial data. If different, we need to prepare 2 versions

    #462844

    Guust
    Moderator
    Post count: 25358

    Yes, they are different.
    For example categories are not imported by slug or name, but ID.
    There are renamed fields and extra fields.

    Compare your exports from both projects and compare, you will see the differences.

    The sample CSV is indeed a bad example, and will be updated in a next release.

    #462845

    Kai Liu
    Expired Member
    Post count: 368

    I have tried to use the existing test csv, and correct those 2 problem field names: contact (to phone), timing (to business_hours). It works. That means V1 sample CSV is alright, but need to change field names to V2, and field names are case sensitive too, first trial I use Business_hours (B in capital) and it did not work.

    Attached excel screen shot showing all the fields I used. Highlighted fields are those different to V1 CSV.

    good to know that

    cheers

    #462848

    Kai Liu
    Expired Member
    Post count: 368

    Found an issue with categories. This seems going backward from V1 to V2.

    In V1, system will take all category names in CSV source file and create new categories in CPT. In V2, all imports going to Uncategorized. This is very inconvenient comparing to the way V1 handles category name.

    This will force us to create categories in advance before importing, and will increase change to make error such as category name spelling. Also, we need to insert categroy ID to CSV files which we do not need to do in V1

    Why GD remove such good features?

    Sam

    #462854

    Guust
    Moderator
    Post count: 25358

    As I wrote earlier: For example in V2 categories are not imported by slug or name, but ID.

    You always had to create categories first. In V1 categories never imported with the listings CSV, you had to create them first, or upload using the Categories CSV, you can import the categories first too in V2.
    Too many people mis-spelled category names or slugs when importing, and importing by ID is a lot more exact.

    If you export current listings you will never have issues like “I use Business_hours (B in capital) and it did not work”, because you will not have to guess correct field names.

    #462860

    Kai Liu
    Expired Member
    Post count: 368

    Thanks Gusst.

    For V1, it does auto create new category name as importing csv. This is how i did the first project. I never created any categories in advance. I just edit them as when they are created, add map pin and default images. This is also the reason for this post because v2 is different, there is mo other way apart from creating category in advance, also need to remember the ID. Category handling works exactlh the same like locations.

    By comparing both methods, auto create catehory when not existing is better and more convenient, especially when dealing with many categories. Save lot of time to create categories manually.

    Anyway, if V2 designed like that way, we have no choice but to follow.

    #462867

    Guust
    Moderator
    Post count: 25358

    Maybe you imported dummy data in V1, which would have created some categories.
    But this has always been the same:
    https://wpgeodirectory.com/docs/core-export/#import

    post_category: use the name of the category or the slug;
    this category has to be created for the post_type before you import!

    You can import categories, see image.

    Thanks

    Attachments:
    #462870

    Kai Liu
    Expired Member
    Post count: 368

    Please see the process in sequence of screen shot. Proof that V1 can create categories on the fly.

    #462875

    Kai Liu
    Expired Member
    Post count: 368

    more… with CSV dummy file. You can try in V1

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

The topic ‘Import Issue – Missing fields’ is closed to new replies, this may be for inactivity, please open a new topic if you have a similar question.