• I downloaded the new 2.0.0 version of Custom Tables today. I want to upload a spreadsheet of data for my table. I have tried to upload several different files. Each time, the import page says that the file was uploaded successfully, but the data does not appear in the Edit Content tab.

    I have made sure that there are the same number of fields in my custom table as there are columns in my spreadsheet. I have saved the file as a CSV from Excel, an XML from Excel, and as a CSV from Open Office. The CSV from Open Office had a semi-colon delimiter, as requested by Custom Tables. However, the other documents I uploaded (that did NOT have a semi-colon delimiter) still got an “imported successfully” message.

    Is there another place that the data goes to, or another step to “activate” the data for use? Or are the uploads actually unsuccessful despite the “imported successfully” messages?

    Thanks.

Viewing 15 replies - 1 through 15 (of 15 total)
  • Hi Jules

    Please send me the csv file via mail (stefan wuk ch) and I will have a look. Something is not working there correctly…

    I have just been doing this also.
    There are two problems.
    The first is that Excel does not output CSV delimited with a ; which you are using as default. The code does not give an error; it just reads the data as one field. (The C in CSV stands for Comma, not semiColon.)

    The second problem is that you have added at least 2 fields at the start of the table. My data file does not have these two fields so the REPLACE command gets an error saying the column count does not match. This error is not caught. I tried exporting an empty table first so I would have the header row to use, but it didn’t give me anything.

    Its not needed that the file is semikolon splitted.

    If it cannot find semikolon splitted files, it tries to split with Comma and if that works, it will import the stuff.

    The second problem is that you have added at least 2 fields at the start of the table.
    -> All tables have id and status as needed fields! If you not have this fields in the table, there is something absolutly wrong.

    You cannot import any WCT file which is not created from plugin.

    If you want to do that, create the table, export it as csv, past your content in the CSV and create the ID field and put everywhere in the status field a “active”.

    Then try import again.

    You’re not hearing what I said.
    The code tries the import with the semicolon as the delimiter first. There is no error returned, even if the CSV file has no semicolons in it. All the data gets read into a single field. So it never tries the second time with a comma as the delimiter.
    You should default to a comma instead of a semicolon.

    Since the data was read into a single field, it won’t match the field layout of the table, so it won’t load.
    Additionally, the two extra fields are at the beginning, so any data a user would want to load won’t have these fields. You could put a helpful note on the page about that. And — trying to export an empty table gives nothing, so there is a problem with that part of the code so your instructions above cannot be followed.

    Thread Starter jules10622

    (@jules10622)

    Hi Stefan,

    Thanks for your quick response.

    I was planning to export the table, then add more data and re-upload it, as you suggested. However, there appears to be a problem with the export feature.

    I created a very simple test table with one entry and tried to export it as a CSV. However, when I clicked on the button to do so, a blank page opened, and nothing else happened. I also got a blank page for the XML and Excel export buttons. I tried to download the file that the button was linking to, but it was not my table, it was a file called “dl.php.html”.

    I can create a separate forum post for the export issue if needed.

    I also created a test CSV document with the two extra fields at the front. I left the first column blank for id, then put “active” in all of the second column for status. I put my content in the columns after that. I saved it as a comma-delimited CSV. It did not give me an error when I uploaded, but just as before, the data did not show up.

    Hi Joy

    Hm… It should, but I dont have a “real” CSV File, because European have CSV files with Semikolon… I will retest it, because it should work.
    Will have a look in this.

    Hi Jules
    What is inside of the dl.php.html file? blank?
    Follow this procedure:
    Open Page “Export/Import”
    Rightklick on the “Export as CSV” and choose “Copy URL”
    past somewhere, then you have a link like:
    http://…/custom-tables/dl.php?i=1&l=953923a0c49c8d244a&t=csv

    now change the URL to following:
    http://…/custom-tables/dl.php?i=1&l=953923a0c49c8d244&t=csv&d=true

    Afterwards, open the link. Past me the “return”.
    Please note, there is a warning because of a deprecated Function within WordPress which is not related to my plugin. Thats ok and no problem! Please post me the code and I can say whats wrong with the export.

    Regards

    I think I find the error.

    My auto recognition of the correct Splitter is not working.
    Can you test the new version of the import script?

    importexport.php

    Save it as pages/importexport.php within your plugin directory.

    Thanks for feedback!

    Thread Starter jules10622

    (@jules10622)

    Hi Stefan,

    After uploading the new importexport.php, now when I click on the “Import/Export” tab, all I see is the code. It does not show up as an interface.

    I saved the file to my desktop, renamed it importexport.php (my computer required me to save it as an .html first), then uploaded it to the pages folder in my plugin directory.

    Should I do something differently?

    Thread Starter jules10622

    (@jules10622)

    Never mind, I figured out how to get the interface back. I pasted the PHP code into Dreamweaver and saved it that way.

    I tried to upload my simple test list, and again it said it was successful, but the data did not show up in the content. My list was comma-delimited.

    When I follow your export instructions from above, this is the message I receive:
    In der Verarbeitung
    Unknown MySQL server host ‘DB_HOST’ (1)

    Thanks for continuing to de-bug.

    Julia

    hm.. I think the dl.php cannot find the wp-config.php file.
    then the export cannot been done.

    Please make following things:
    -> printscreen of the table setup (I want to create by me the same table)
    -> send me the csv file (contains your data)
    -> Press Backup/Restore and make a backup (contains your data)

    If you dont want to share your data, possible, but difficult to help. I will delete the data after finding the bug.

    send me that to stefan wuk ch and Ill will fix it asap.

    Stefan-

    I exported a table and the process worked great. Now, I would like to import that data into another table with a new name as I will just need to tweak some of the information. The import procedure is failing – it looks like it worked but nothing is in the table. Am I doing something wrong? Thanks.

    Okay, more info. I am now getting the following error:

    WordPress database error: [Column count doesn’t match value count at row 1]

    Any insights?

    as stated in the export description.

    Do not change the amount of fields or the headerline within the export!
    Also do not modify the table online (create new fields/delete existing one) until you reimport.

    the fields need to be 1:1 otherwise the table doenst know how to import.

    Have you delelted the id or status column? reenter it and correct it manually.

    If you need to know how it should look like, make an export, hos in the csv file, then change your own csv file accordently.

    PS: If you need help, attach your export (new one with correct format) and the altered with the content in a ticket.

    See on the page http://www.wuk-custom-tables.com -> ticket

    then I can help.

    Hi Stefan-

    Thanks for your prompt response.I kept the headerline the same and counted the number of fields about 100x πŸ™‚ Since the last two fields are rich text I was wondering if there was any thrashing with some of the characters in the fields.

    I ended up exporting/importing from the .db level and it worked fine. I will send along the export as our users will need to do this in the future – thanks.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘[Plugin: custom tables] Where does imported data go?’ is closed to new replies.