WordPress.org

Ready to get started?Download WordPress

Forums

WP-Table Reloaded
Table HTML Import MySQL Errors (7 posts)

  1. flashbuddy
    Member
    Posted 3 years ago #

    A picture is worth a thousand words:
    http://easycaptures.com/fs/uploaded/437/8449174021.png

    My html file had nothing but head, body, and table th tr td

    Imported table throws errors. There is no table data.

  2. argonius
    Member
    Posted 3 years ago #

    Open your wp-config.php and put this line:
    error_reporting(E_ERROR | E_PARSE);
    after first PHP opening tag. It should deny all warnings.

    For turning all errors including parse errors for production site you can use:
    error_reporting(0);
    but it's not really recommended. It can't be possible to trace errors if they appear.

  3. TobiasBg
    Member
    Plugin Author

    Posted 3 years ago #

    Hi,

    thanks for your post and the screenshot.

    Those errors are a result of an incorrect import of an HTML table into WP-Table Reloaded. Likely, your table has invalid HTML in it (like wrong nesting of the elements), or there might be something wrong with the character encoding (like "special" characters, e.g. from foreign languages), due to which the table can not be read from the database.

    I do not recommend to add those error_reporting things into your wp-config.php file, as argonius describes, because that will not change or fix the issue. It will just hide the error message, which however is better down by fixing the import and the table.

    As a start please delete the table that was imported incorrectly (within WP-Table Reloaded) and upload the HTML file that you were trying to import and post a link to it, please.

    Thanks!
    Tobias

  4. flashbuddy
    Member
    Posted 3 years ago #

    1st, I'm amazed the plugin can figure out what part of the code to parse in the first place.

    I thought the particular structure of the table's html might be the culprit. I had stripped out <p> tags etc. Here is an screenshot of the abbreviated code that I tried to import (unsuccessfully). I'll remove the <tbody> and <thead>. Is there a sample of 'approved' table html somewhere?

    Screenshot of my code: http://www.box.net/shared/rqb4x5q93d

  5. TobiasBg
    Member
    Plugin Author

    Posted 3 years ago #

    Hi,

    thanks for the screenshot! That helped a lot!
    The problem is the "colspan" in the first row. The HTML importer does currently not work with "colspans" in tables, as they are done differently in WP-Table Reloaded.
    If you remove the colspan in your HTML code and add an additional (empty) table cell in that row, the import should work. You can than add the colspan again in WP-Table Reloaded, with the "colspan" button below the table input fields.

    Regards,
    Tobias

  6. flashbuddy
    Member
    Posted 3 years ago #

    I successfully imported the table with no errors. I had edited the table to remove <tbody> and <th>. Shockingly, I left in the colspan="2".

    The final table did not retain the colspan. It divided the row into two cells. I took your advice and subsequently edited that row:
    http://baytowntrolley.org/route-maps-service-areas/route-one/

    Thanks for the illumination here.

  7. TobiasBg
    Member
    Plugin Author

    Posted 3 years ago #

    Hi,

    great that this did the trick!

    And thank you so much for your donation! That's really nice!

    Best wishes,
    Tobias

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic