2 part import issue

This topic contains 18 replies, has 2 voices, and was last updated by  Pete Williams 6 years, 1 month ago.

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

Open Support Ticket
  • Author
    Posts
  • #461528

    Pete Williams
    Full Member
    Post count: 34

    Hi Guys, using V2 I have done various test imports of data, which worked on V1 (I only used that for about a week, then migrated)

    1st issue, even though I have a category of Wedding DJ set up (ID 308) all records I import go to cat 317 uncategorised instead. I have popoulated the field with 308, with Wedding DJ and with wedding-dj, yet each time the records dont change from uncategorised (yes I am using ‘update’)

    2nd issue – Even though I have different locations populated in the CSV for import, everything ends up in Greater Manchester. This matches the original location I specified in GD before purchasing and adding the location manager plugin. Although I have edited the settings for multiplication, everything still ends up in Greater Manchester

    Any suggestions please?

    #461535

    Pete Williams
    Full Member
    Post count: 34

    Also regarding imports – Where I’ve added custom fields, is there a specific order and position for these in the CSV columns (or course the downloadable template won’t reflect these extra fields)?

    Thanks!

    Pete

    #461539

    Alex Rollin
    Moderator
    Post count: 27815

    Hello,

    did you already export from the V2 site? If you have added a listing there then the export will give you a CSV that is properly formatted.

    Your settings sound correct, so it is probably an issue with the CSV format. The order is set down for you in the export file, and your data will need to merge into that format without changes to columns.

    #461541

    Pete Williams
    Full Member
    Post count: 34

    Hi Alex! The export is actually from a different directory software – Business Directory if that’s not swearing in here 😉

    So far I’ve manually added the content for all columns in the default template, so as you suggest, should all be ok

    My far more technical colleague has this afternoon managed to create a mySQL query to create a CSV without several hours of me copying and pasting.

    GD confirms XXX records successfully imported, so I suspect the CSV is ok (apart from me not knowing what data to enter into the post_category, so they all go to the wrong category and Greater Manchester location – weird!!

    Sample of my CSV is attached in case you can spot any idiot errors (every chance!!)

    #461542

    Pete Williams
    Full Member
    Post count: 34

    system won’t allow spreadsheet uploads, but happy to send you one if you can direct me…

    #461543

    Pete Williams
    Full Member
    Post count: 34

    picture of CSV

    #461545

    Alex Rollin
    Moderator
    Post count: 27815

    If you go to

    GD , Settings, Import/Export

    and then export the places CSV, that’s what it ought to be compared to. They have to match exactly.

    Also, Excel can cause formatting issues…cautions are listed here :

    https://wpgeodirectory.com/docs/core-export/#import

    #462020

    Pete Williams
    Full Member
    Post count: 34

    I am still really struggling with the import I’m afraid

    I did download the sample CSV, although it doesn’t actually download, it just puts the text on the screen which I then have to copy and paste into a text file to then make into a CSV

    I then have several issues with this which I’m finding confusing:
    Sample csv gives me these headings:
    ID,post_title,post_author,post_content,post_category,post_tags,post_type,post_status,featured,video,street,city,region,country,zip,latitude,longitude,neighbourhood,neighbourhood_latitude,neighbourhood_longitude,timing,contact,email,website,twitter,facebook,post_images

    export csv of the listing I have already created however gives me there headings:
    ID post_title post_content post_status post_author post_type post_tags post_category default_category featured street city region country zip latitude longitude email website twitter facebook logo djepcode phone video special_offers business_hours post_images

    As you can see, the columns are in a different order. This may or may not cause a problem, I don’t know

    However, if without touching the downloaded export CSV I then try to import it, I get the screen shot attached (and because the error box is so small I cant read the error (clicking on it doesn’t help))

    The instructions you linked to above also mention this about images – ‘The CSV file has columns for any images you want to add to your listings, look for the IMAGE columns,
    You can add additional columns if you want to add more images to your listings, they all should be named IMAGE.’

    Yes as you can see from the headers of the downloaded CSV’s, there is no IMAGE heading, it’s post_images and there’s only one!

    I’m sure its me that’s creating this mess, but even after following the instructions I am still totally lost.

    I simply want to be able to import a CSV (using the default headings and a small amount of my own) which really shouldn’t be too hard.

    FYI I have created CSVs in Excel, Mac Numbers and even an online CSV creator, none of them will import

    Please help!

    Thanks

    Pete

    #462025

    Pete Williams
    Full Member
    Post count: 34

    More info that may help identify the issue…

    Where usually (being on a Mac) I use safari, if I use Chrome then I do get an actual CSV file. So without toughing it, I tried to upload this – failed with the same error pictured previously

    If I open using excel, then I get an error talking about SYLK

    If I open using Mac Numbers, then no error, all looks fine, yet still produces the error upon import

    Hope that helps!

    #462027

    Pete Williams
    Full Member
    Post count: 34
    This reply has been marked as private.
    #462087

    Alex Rollin
    Moderator
    Post count: 27815

    If you go to

    GD , Settings, Import/Export

    and then export the places CSV, that’s what it ought to be compared to. They have to match exactly.

    The “Sample” file is not the same as the export, yes, you will need to use the export, not the sample.

    The columns must match exactly.

    Please see these instructions here:
    https://wpgeodirectory.com/docs-v2/geodirectory/settings/import-export/#recommended

    #462131

    Pete Williams
    Full Member
    Post count: 34

    Thanks for the tip Alex

    So I followed the instructions, have now installed Libreoffice

    Created one new sample record via the admin GUI which sits alongside the sample/ dummy data already installed

    Downloaded the csv export, made no changes to it, tried to upload, and got exactly the same error, which gives this response in the debugger

    [08-Jan-2019 10:27:08 UTC] PHP Notice: Trying to get property of non-object in /home/weddingd/public_html/wp-content/themes/supreme-directory/content-featured-area.php on line 2
    [08-Jan-2019 10:27:08 UTC] PHP Notice: Trying to get property of non-object in /home/weddingd/public_html/wp-content/themes/supreme-directory/content-featured-area.php on line 5

    Totally baffled!!

    #462161

    Pete Williams
    Full Member
    Post count: 34

    Quick update, I have tried this CSV export and immediate import on both Safari and Chrome, so I don’t think it’s browser specific

    Look forward to your ideas on what to check/ do next…

    Thanks

    #462189

    Pete Williams
    Full Member
    Post count: 34

    Lots more testing here, including clearing out all data (dummy and mine) so starting clean

    Insert 10 dummy records using the GD system and into the default ‘places’ category

    export listings in both Safari and Chrome, import with even opening the file, still the same issue

    Perhaps relevant – opening the csv in libreoffice, then without making any changes, saving it as a text csv, it claims it can’t save it as a csv (as shown by attached pics)

    This then makes me wonder if the v2 export is actually working properly and creating a proper csv (if it isn’t this would answer the problem of course)

    Any thoughts guys?

    #462238

    Pete Williams
    Full Member
    Post count: 34

    Any suggestions guys?

Viewing 15 posts - 1 through 15 (of 19 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