JohnTendik / jtrt-tables

A Wordpress plugin to help users create responsive tables without having to read or write code.
GNU General Public License v2.0
22 stars 6 forks source link

table border missing after image are loaded in table #81

Open mtba85 opened 6 years ago

mtba85 commented 6 years ago

Hi,

Could you help me to solve this issue as when i add image in the table all border and table color are missing.

JohnTendik commented 6 years ago

Do you mean that when you add an image, all of the custom background colors and borders disappear? Interesting, do you have a console error log or possibly steps to reproduce this bug?

Thanks JT

mtba85 commented 6 years ago

Hi,  After done few testing I realised that the bug happened as JTRT css reset to default after clashing with others plugin. Now I have manually added css in the WordPress.  When the page is empty the table have no error but when added few other info at will cause this problem. Here are the error taken from my browser. Uncaught SyntaxError: Unexpected token _ in JSON at position 57    at JSON.parse ()    at HTMLTableElement. (jtrt-responsive-tables-public.js?ver=4.0:39)    at Function.each (jquery.js?ver=1.12.4:2)    at a.fn.init.each (jquery.js?ver=1.12.4:2)    at HTMLDocument. (jtrt-responsive-tables-public.js?ver=4.0:35)    at i (jquery.js?ver=1.12.4:2)    at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4:2)    at Function.ready (jquery.js?ver=1.12.4:2)    at HTMLDocument.K (jquery.js?ver=1.12.4:2)

First error at HTMLTableElement. (jtrt-responsive-tables-public.js?ver=4.0:39) jtrt_tables.each(function(element) { var table = $(jtrt_tables[element]); var id = table.attr('data-jtrt-table-id'); var jtrt_table_data = JSON.parse($('textarea#jtrt_tablesettings'+id).html()); if(jtrt_table_data[3] != undefined){ jtrt_table_data[3].forEach(function(element, indx1) { var tRow = table.find('tr').eq(element['row']); var tCell = tRow.find('td,th').eq(element['col']); tCell.html(element['val']); }); } Second error at HTMLDocument. (jtrt-responsive-tables-public.js?ver=4.0:35) jtrt_tables.each(function(element) { var table = $(jtrt_tables[element]); var id = table.attr('data-jtrt-table-id'); var jtrt_table_data = JSON.parse($('textarea#jtrt_tablesettings'+id).html()); if(jtrt_table_data[3] != undefined){ jtrt_table_data[3].forEach(function(element, indx1) { var tRow = table.find('tr').eq(element['row']); var tCell = tRow.find('td,th').eq(element['col']); tCell.html(element['val']); }); } Please do inform me if you want more information as i can see this table have a lot of potential just need to settle minor bug in the code. Regards,Tariq Arif

Sent from Yahoo Mail on Android

On Thu, 31 May 2018 at 1:20 am, John Tendiknotifications@github.com wrote:
Do you mean that when you add an image, all of the custom background colors and borders disappear? Interesting, do you have a console error log or possibly steps to reproduce this bug?

Thanks JT

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

Seamate commented 6 years ago

I wanted to post about this issue and saw that someone else has already raised it here. John, please do something about this. A stitch in time.....

Seamate commented 6 years ago

To reproduce the problem, simply create a new table. Add some text and then go on to add at least an image in one of the cells. Save and try to view the table. You will notice that it displays without borders. However, when you remove the image and left only the text in the table, the borders appear.

Thank you.

JohnTendik commented 6 years ago

I will take a look at this tonight. I apologize for lack of updates, time has been a precious resource lately :D

Seamate commented 6 years ago

@JohnTendik Thanks a lot bro.

JohnTendik commented 6 years ago

@Seamate I am unable to reproduce this issue, can you provide some more info if possible?

I tried the following steps to try and reproduce:

1) create new table 2) add borders 3) add text 4) add image 5) save

As @mtba85 stated, it could be some other plugin interfering with the styles.

Seamate commented 6 years ago

Interestingly, I also discovered that the borders reappeared suddenly. I don't know which plugin caused the conflict.
However, if I try to INSERT images, it gets stuck on "Doing calculations. Please wait.." Hence, what I do to add images to the table is to copy the image's url and paste it in the table while wrapping it in the tag.

Please see if you can reproduce this problem. It could be linked to the plugin dispute. Thank you, John, for your time.

JohnTendik commented 6 years ago

@Seamate good to hear the borders are back, it sounds like another plugin is interfering with the border styles. I technically could add !important on all of my styles haha but I'm pretty sure everyone would hate me.

As for the image upload issue, I just released an update that fixed the broken image uploader. Please let me know if you still run into issues after the update :)

Thanks

Seamate commented 6 years ago

Thanks bro. I didn't know an update would be released so quickly. I wanted to ask if you could make it possible to search for tables using the table shortcode. It is much easier to locate tables that way if they run into hundreds or thousands. At the moment, it is only possible to search with the title of the table. Please consider this in future releases.

Thanks for fixing the image insert issue. Also, the tables area jumping issue seems to have been fixed with the update. Very cool