Okay
  Public Ticket #3198066
parser error uploading a table
Closed

Comments

  • Vince started the conversation

    Hello, I'm trying to upload a table into wpdatatables and am getting the errror "There was an error while trying to save the table! parsererror".

    I have googled for previous answers - and have confirmed that I have no missing column headers via excel formulas. I also have tried removing all special characters like commas and dashes from my column headers, and still I am receiving the error. I have also tried to upload as CSV or XLSX and am still receiving the rror.

    please help.

  • Vince replied

    it looks to be a simple issue of a limit to maximum number of columns. I created a basic XLSX with 10 rows and 300 columns and got the same error. uploading the same XLSX with 50 columns works however. Please help me overcome this limitation.

  •  1,850
    Miloš replied

    Hi, Vince 

    Firstly, my apologies for the late response.

    We had a New Years break and are back,   will do our best to be quick going forward.

    I wish you a Happy New Year, and all the best in 2023!

    -

    You are correct.  This is a limitation that is not coming from our plugin,

    but it rather comes from WordPress and server performance and how much data it can handle.

    And it is not due to any headers missing, but seems to me the issue is with the size of the data set/number of columns, as you pointed out.

    -

    Can you tell me, when you create the table, do you choose 

     "Create a data table linked to an existing data source" 

     or  

    "Create a data table by importing data from a data source"?

    9938399432.png


    Also, could you please send us two samples of your XLSX source files ( you can either wrap them in a zipped format,  or upload them as weTransfer and send us download links),

    one file as the "smaller version" with 50 columns,

    and the other "full data set" with 300 columns - i can then check them our and reproduce the issue on our Test site?

    Then i will be able to advise you more.

    Of course, if the files contain any sensitive data, please mark reply as PRIVATE - then only we can see it.

    Thank you


    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  • Vince replied

    Hi Milos,

    I was using the "create a table by importing", when I tried the "create a table linked to an existing data source" just now it actually worked for me.

    I uploaded sample test data, the 50 column works, getting the 268 column file does not work. 

    I'll be playing around with it more, maybe using the "linking" version upload will work. Do you have a sense on the difference between the two uploads, and which one will load faster for users?

    Thanks

  •  1,850
    Miloš replied


    Hi, Vince

    Firstly, I would like to sincerely apologize for the delayed response as we have been experiencing an unusually high number of tickets. I am sorry that it has taken longer than usual to respond to your concern and your patience is highly appreciated.

    -

    Thank you for sending me the testing samples/Excel files.

    I am able to reproduce the error,   if i try to import the data from the larger file at our Sandbox Site.

    It does initially make the preview by showing all the columns that would be created,

    but if i click to generate the table and go in the editor,  then it seems that the server or WordPress is not capable to load all the columns

    9573722640.png


    3811295227.png

    -

    2. But if i try the same on my localhost on my PC - then it works without any errors.

    5579342785.png
    6173339902.png

    So it seems that this is some kind of a limitation coming from live servers with WordPress and the number of columns...

    -

    This also happens, for example if an Excel file has too many rows, it seems that it comes from the same "limitation"/issue.

    For example, data that has more than few thousand rows ( or in this case, a lot of columns)

    can  not be imported in this way directly via the plugin - this is a limitation that is coming from WordPress itself combined with server performance.

    But there is a solution.

    What you can do is, you can import the file, in form of Excel, CSV, or spreadsheet directly in your database via your database management tool, such as PhPMyAdmin.

    Here is an example how you can do it.

    When you're importing a CSV file in your database, you need to navigate to the WordPress database, and click on "Import":

    8377693210.png

    Then click on "Choose file" and select your CSV file:

    5612183262.png

    The structure of the file needs to be set so the first row of the file contains column headers. For example, if the table you're creating is supposed to look like this:

    1218668569.png

    The structure of the CSV file should contain "COLUMN1, COLUMN2, COLUMN3" in the first row, like this:

    COLUMN1,COLUMN2,COLUMN3
    Google,Test,123
    Yahoo,Test2,456
    Facebook,Test3,789
    

    Then, when you select that file scroll down, and check the "The first line of the file contains the table column names" check-box, so the first line is used for headers of the table; and then click on GO:

    6597093190.png

    You should see a screen similar to this:

    6614546190.png

    In my case, it's "TABLE 114", and you can click on it to open that database table:

    6217716179.png

    To avoid having any issues when using this table in wpDataTable, my advice is to change its name (because it contains a space). So, go to the "Operations" tab:

    1467228342.png

    And under "Table Options" rename that table to what you want it to be. 

    8668458192.png

    Just make sure not to include dots ( . ) or spaces (don't use any special characters). You can rename the table to be "table_1" for example. After you rename it, click on GO in the right corner of "Table options" section:

    3299082668.png

    And that's it. You're now able to create an SQL query based table using this query (for example):

    SELECT * FROM table_1

    -

    Let me know if this might work for your use-case, if you can try importing the file directly through your database management tool, and then making an SQL table from it?

    Thank you


    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  •   Miloš replied privately