Listings: Import CSV Not working

This topic contains 5 replies, has 4 voices, and was last updated by  John Els 5 years, 11 months ago.

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

Open Support Ticket

Tagged: , , ,

  • Author
    Posts
  • #459252

    Ellory Wells
    Lifetime Member
    Post count: 64

    Hey guys, I’m new to the plugin, but I’ve spent 4-5 hours with it and on your forums.

    Problem:

    CSV files won’t upload. The current error is this: “The uploaded file is not a valid csv file. Please try again” but the file in question is the sample csv file I just downloaded from the plugin. The file was on my computer less than 10 seconds and it was never opened.

    What I tried:

    1:) I was on WP Multisite, and I added CSV to the allowed file upload extenstions, but that didn’t work. After trying several things, I ended deleting everything and installing a fresh WordPress, version 4.9.9 I believe

    2:) on the new WP Installation, I tried with your plugin 1.6 and got a security error which I fixed by adding the allow-questionable-uploads: true text in my wp-config.php file. However, although I could now upload the CSV file, I started getting the error “The uploaded file is not a valid csv file. Please try again.” But it’s the unaltered file I just downloaded from the plugin.

    3:) I upgraded to the 2.0 version of the plugin. Same errors.

    4: In installed your parent and child themes, activated Supreme Directory, same errors.

    Now, I’m at a lost. I don’t know what to do next. And, it looks like upload problems are a hot topic in the forums.

    #459262

    Alex Rollin
    Moderator
    Post count: 27815

    This seems to be a WP Bug

    The issue is from WordPress side with csv file upload. See https://core.trac.wordpress.org/ticket/45615

    It seems a fix will be released with WP soon.

    #459263

    Ellory Wells
    Lifetime Member
    Post count: 64

    Thanks Alex. In the thread you linked, there was a link to this fix: https://gist.github.com/rmpel/e1e2452ca06ab621fe061e0fde7ae150#file-wp-499-up-fix-csv-upload-php

    I’m nto sure what to do w/ that info or where to put it. Could you advise?

    #459266

    Matt
    Lifetime Member
    Post count: 38

    Hi Ellory, I just did this and it fixed the problem. In the ‘wp-includes’ folder you can edit the ‘functions.php’ file. Go to line 2494 or search for that section on the page (‘tsv’ will get you there) and then just add ‘|csv’ (vertical bar plus csv) to the end of line 2494 as shown in this picture: https://core.trac.wordpress.org/attachment/ticket/45615/45615-2.diff

    #459267

    Ellory Wells
    Lifetime Member
    Post count: 64

    that worked!

    Thank you Matt and Alex!

    #459623

    John Els
    Expired Member
    Post count: 65

    Hey everyone, thanks for this. It solved my problem too. Have a great day!

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