• I am attempting to upload a CSV file with just a couple rows of data and it seems to work but nothing appears on the line except for the ID.

    I have searched the forum for all similar issues and tried everything that has been suggested including double quote enclosures and saving as a CSV UTF-8 format. I have manually added items to the database and then downloaded the CSV file to populate with just a couple rows of data and then uploaded that as well.

    Everything I do seems to upload fine, but when I look for the records, I only see blank cells for each row (except for the ID).

    I have almost 10,000 entries to make and to enter it all manually will take a massive amount of time. I only have 10 columns set up in the database. I have the ID setup to be checked for duplicates.

    Any help would be appreciated!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author xnau webdesign

    (@xnau)

    OK, so you’re taking the right approach by testing the upload with a small number of records.

    I am assuming you’re not seeing any error messages, so your next step is to turn plugin debugging on, clear the debugging log, then try your test import. The log will contain the details of the import, it may be clear what is happning.

    Thread Starter digimadre

    (@digimadre)

    Thanks for replying so quickly! I appreciate it very much.

    I cleared the debug log and attempted another upload. I have double quotes around each item and saved as a CSV UTF-8. The only cells that do not have the double quotes are the empty cells. The ID cell is also empty.

    I have set the enclosure character to Auto and the Delimiter character to Auto as well. The Duplicate Record Preference is set to “Don’t import the record” and the Duplicate Record Check Field is the Record ID.

    I have also tried to upload with the cells not enclosed in double quotes because I noticed that when I have done a download of the manually entered file, it doesn’t seem to have any quotes when I look at it in notepad.

    I have even deleted the plugin and reactivated it so I knew that I had a clean area to work with, but I’m still having the same issue.

    I have an empty line that has been added with only the private ID and the Date Recorded filled in.

    The list is working fine on our website using the data I have manually entered. I have set it up to Search the Last Names and only show results for that filter. It is a database of Indiana Pioneer ancestors and we like to be able to allow potential applicants to Search to see if their Indiana pioneer ancestor has been approved in our lineage society.

    [07/13/22 8:40pm UTC]
    PDb_submission\main_query\base_query::execute_query storing record: INSERT INTO wp_participants_database SET date_recorded = “2022-07-13 20:40:27”, date_updated = “2022-07-13 20:40:27”, private_id = ‘296F9NA’

    Plugin Author xnau webdesign

    (@xnau)

    Just to make sure we’re on the same page: you should be using the latest version of Participants Database.

    In the CSV format, enclosures (usually double quotes) are only needed if the data contains a delimiter or a line break. So, it’s normal for some fields to have enclosures and some not. There’s no harm in unnecessarily enclosing data.

    Also, if your enclosure is double quote, the data cannot contain a double quote. This is true for any enclosure character. Probably this is not happening in your case, you’d be getting error messages about the header not matching the data.

    It’s best not to use “auto” enclosures and delimiters if you know what they are, the auto detection can get it wrong, especially with a short CSV.

    If you have the debugging level set to “verbose” you’ll see a detailed account of the import process.

    If you are not getting any error messages about the header names, and the imported field data isn’t making it into the INSERT query, then the data for each missing field you’re importing is considered invalid for some reason.

    Thread Starter digimadre

    (@digimadre)

    Once again, I appreciate your help with this. I took your advice and checked the enclosure and delimiter character, but it still uploaded empty rows.

    Here is the google doc with the dubug log:

    https://docs.google.com/document/d/1qyBjF3ytSaP5KBV7MFbHPiydSXCAMlGE2-P72qK5uT0/edit?usp=sharing

    I included a snapshot of how I set up the fields.

    Plugin Author xnau webdesign

    (@xnau)

    From what I see there, the CSV header row isn’t getting read, so it doesn’t know which columns to import. I don’t know haw that is happening without showing you an error message. I teseted several possibilities, they all generated error messages, but I’m certain that something is not right with the header row of the CSV.

    Inspect the CSV file using a plain text editor and make sure it is correct, should be a comma-separated list of field names.

    In general, it could be that the method you are using to generate your CSV file is not producing a file that can be correctly read.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Upload CSV and empty rows are added’ is closed to new replies.