WordPress.org

Ready to get started?Download WordPress

Forums

WP-Table Reloaded
[resolved] Display issues with HTML entities and column widths (3 posts)

  1. kgagne
    Member
    Posted 4 years ago #

    Hello,

    As I've said before: great plugin! It's extremely versatile, allowing me to find use for it in a variety of scenarios. I'm using v1.7 with WordPress v2.9.2.

    I'm hoping the author can help me with a few issues. The first is regardling encoded HTML entities. They don't seem to be translated when they appear in a table. For example, this table should have checkmarks, but instead I see ✓

    http://www.gamebits.net/screens/789face2175323d019e42f59005a44b5.jpg

    The second question is about column widths. The above table is produced with this code:

    [table id=1 print_description=false first_row_th=true column_widths="41%|41%|6%|6%|6%" use_tablesorter=false /]

    If I change use_tablesorter to "true", then the first, third, fourth, and fifth columns become wider and the second column shorter, resulting in undesired text wrapping:

    http://www.gamebits.net/screens/a1f96c2b5119f6924701faa6f574012b.jpg

    Is there a way to prevent this?

    Finally, I was trying to import a table by manually pasting in HTML to replace an existing table. It turns out I had some bad HTML in my code, which resulted in this error:

    Warning: Invalid argument supplied for foreach() in /home/kgagne/apl2bits/wp-content/plugins/wp-table-reloaded/controllers/controller-admin.php on line 905

    Warning: Invalid argument supplied for foreach() in /home/kgagne/apl2bits/wp-content/plugins/wp-table-reloaded/controllers/controller-admin.php on line 907

    Is that the expected behavior when submitting a badly formatted table?

    Thank you,

    -Ken

  2. TobiasBg
    Member
    Plugin Author

    Posted 4 years ago #

    Hi Ken,

    thanks for your questions!

    1. regarding entities:
    Weird, I thought that those work well and are not escaped during the printing, but it looks like it... I'll check again.
    Meanwhile, can you try to simply use that checkmark in the table, instead of the entity? That should work too, actually.

    2. column widths:
    You will need to add

    "bAutoWidth": false

    to the "Custom Commands" for DataTables on the "Edit" screen of the table (see the FAQ for more).

    3. importing the HTML table:
    You should certainly not see such an error message during the import, but a plain message like "Table could not be imported.".
    This might actually mean, that the error is not the result of malformed HTML, but of characters in a different character encoding within it.
    Can you maybe email a HTML file with the table to me, so that I can test it?

    Best wishes,
    Tobias

  3. kgagne
    Member
    Posted 4 years ago #

    Tobias,

    Thanks for the quick reply!

    I just tried pasting ✓ into a table cell, and it displayed correctly.

    Thanks for the bAutoWidth command, and for the gentle reminder to RTFM. You'd previously helped me with a previous custom command, and I didn't know the source -- I see now the link right beneath the "Custom Commands" field. I will have to look at these options more thoroughly next time.

    I'll email you the HTML table that failed to import.

    Thanks!

    -Ken

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic