• Hello! I’m using WordPress 3.9.1 and the SpeakUp! Email Petitions plugin 2.4.2. I also have the Speakup! Email Petitions Importer 1.2 installed.

    I created a test petition and inserted two signatures into it. Then I exported the signatures as a CSV file. Then I created another, empty test petition and tried to import the CSV file into it.

    But no matter what I do, the importer only says “This is not a CSV file.” I looked at the file, and it looks like exactly what the importer wants – 16 columns separated with tabs in exactly the specified order, all values inside double quotes (some of them with no value, just “”, as I’m not collecting all these data in my petition).

    I have the “First line contents column titles” box checked, as the first line is just that. This is the unmodified exported CSV straight from the Speakup! Email Petitions plugin itself, so please advise me what to do. I really need the importer, there are some 57000 signatures waiting to be imported…

    P.S. I even tried saving the original CSV from Excel as Unicode text, then removed all the quotes using a text editor and replaced all empty field values by a letter x. That didn’t help either.

    https://www.ads-software.com/plugins/speakup-email-petitions-importer/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter sepe

    (@sepe)

    I got around the problem by editing plugins/speakup-email-petitions-importer/class.importer.php a bit – I commented out the if statement

    if($_FILES[‘csv’][‘type’]==’text/csv’){

    and the related else statement with the error message “This is not a CSV file!”.

    Googling around for help, I found that this if statement is very unreliable, as the value of ‘type’ is browser-specific. With this slight modification, the importer accepts tab-delimited txt files and csv files without problems.

    I hope this helps anyone who has similar problems with the importer.

    Plugin Author Bastien Ho

    (@bastho)

    Hi,
    thank you for the feedback.
    I think the version 1.3 will solve the problem :
    * Fix: Check csv format for all navigators
    * Fix: More flexible for number of each lines
    * Fix: Check for quote removing
    * Fix : Prevent some PHP warnings

    can you confirm ?

    Thread Starter sepe

    (@sepe)

    Thanks for your reply!

    I hesitate to update the importer now that I have gotten it to work. I need to get our petition imported in just a couple of days, and I’m almost there – but now I ran into another problem.

    When I import our big petition which has around 63.000 confirmed signatures, I do it 7000 signatures at a time – this seems to work reliably, bigger chunks are sometimes not completely imported for some reason.

    But after I have imported about about 50.000 signatures successfully, the importer stops showing the file selection / import page. When I navigate to this page, all I get is a blank page. I have deleted the signatures from the WP database and tried again, but the same thing happens – first time it happened after about 48.000 signatures, second time after about 55.000.

    At first I thought it might be a disk quota issue, but on second thought I don’t see why that would cause the importer to show a blank page instead of the file selection. Any ideas about what could cause this? Please answer soon, I’m running out of time… thanks in advance.

    Thread Starter sepe

    (@sepe)

    Well, in the end I made a backup of my tweaked version and installed version 1.3. The same problem persists – I cannot see the file selection / import page, all I get is a blank page.

    Thread Starter sepe

    (@sepe)

    Deleting all the entries from the database fixed this problem the last time, and probably would do it for 1.3 too. After deleting the entries from the petition, the importer starts working again.

    Thread Starter sepe

    (@sepe)

    Sounds a bit like a java heap size or memory problem? Is more required if there are lots of entries in the petition? No error message though, just a blank screen.

    Thread Starter sepe

    (@sepe)

    No hurry any more, I got the job done by importing with a mySQL admin plugin (Adminer). Just so you know, there seems to be some problem with your importer’s ability to cope with large databases.

    I did install the new importer version 1.3, and except for the memory (?) problem with a large database it worked without tweaking in my browser (Google Chrome).

    I noticed that now the filename extension MUST be “csv” – the same file will not be accepted if it is renamed to “txt”.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Importer only says "This is not a CSV file"’ is closed to new replies.