Incorrect column count error with new version
-
I have just updated to the new version 2. I am now getting an error when I visit my page. Before I try and do anything I thought I better let you know. I have had that table working for years without a problem and it still displays as it should. But now I get an error message on my browser. I have tried firefox and edge and both give it.
The page I need help with: [log in to see the link]
-
Same problem on two of my web sites.
Message is DataTables warning: table id=tablepress-PublicationList – Incorrect column count. For more information about this error, please see https://datatables.net/tn/18 but happens on different tables. Have tried re-importing the table.
Hi,
thanks for your post, and sorry for the trouble.
@johnbrid : Your table uses merged/combined cells, via the
#colspan#
keyword. These are not compatible with the JavaScript code of the “Table Features for Site Visitors” (like sorting, searching, pagination, etc.). Therefore, it is not possible to use these with this table. To get rid of the error message (and to slighly improve performance in this case), please uncheck the “Enable Visitor Features” on the table’s “Edit” screen.@cloudjarvis : Are you maybe also using such combined cells? If so, please try the same solution. If not, can you please post a link to the page with the table where this problem happens, so that I can take a direct look? Thanks!
Regards,
TobiasHi Tobias
Thanks for the quick reply. Unfortunately I cannot do that. It will not let me.
I certainly did not have that feature ticked before the update. Currently that whole section has the first tick box empty (Enable visitor feature). The rest of the tick boxes under that one are ticked but slightly faint and do not respond, so I cannot untick them.
If I click the top box to try and enable them it says “You cannot enable the table features…..” and so I cannot enable to delete the rest of the ticks.
Thanks for being on this.
John
Hi @johnbrid,
thanks for checking this! Can you maybe provide the full “You cannot enable the table features …” message that you are seeing there?
If possible, I’d like to take a direct look at this on your site. Could you therefore please get in touch via email (the address is on https://tablepress.org/impressum/ )? That way, I can investigate this directly. Thanks!
Regards,
TobiasHi Tobias, My websites are BWISC – British West Indies Study Circle and WIPSG – West Indies Philatelic Study Group. I am just in the middle of building the latter which will replace the former. I don’t use #colspan#
I was going to sort out donation / licensing when I had finished building!
The message comes up seemingly randomly, not on a specific page (but I do reference the same tables on many pages). Just got it when I went to Country_CaymanIslands – BWISC and seems to be constant error.
DataTables warning: table id=tablepress-JournalIndexes – Incorrect column count.
The code on this page is [table id=JournalIndexes Filter=Cayman /]
In this case it returns nil rows, could that be the cause?
Regards, Steve (aka Cloud)
Sorry about the delay. I had to go out. I have replied to your email with pictures. I seem to have stopped the error message by hiding the rows containing rowspan and colspan and then reshowing them . Dont know why.
Although the website is now working fine with no error messages, the table features options still seemed screwed up. Top box unticked but all the sub options ticked. They should all be unticked but I cannort change anything. They will not operate.
Hi John,
great to hear that it’s working again for you ?? It seems like it just needed another “Save Changes” to get the checkbox right.
@cloudjarvis: Most likely, the root cause here is indeed filtering. On https://bwisc.org/country_caymanislands the “Journal Indexes” table only has one row. This means that that row will be a “table body row”, and the table is then missing a header row. Such a header row is however required for the “Table Features for Site Visitors” to work (the underlying DataTables JavaScript library requires that). So, you would either have to run off the “Enable Visitor Features” checkbox for this table, or make sure that it always has a header row.
Regards,
TobiasHi Tobias,
I have created a test page here: https://wipsg.org/tablepress-test
It contains two shortcodes
[table id=ExhibitsList? filter=NoRows /]
[table id=ExhibitsList? filter=Antigua /]
The first shortcode is causing the error as there are no rows in the table that match the criteria (the header row exists / shows).Not viable to turn off “Enable Visitor Features” as need filtering/searching (+).
Ensuring at least one row exists is a lot of work as I have several tables each of which are used on about 25 pages with different filters. The table contains a global list but is filtered down to specific countries for each page picking out keywords.
No problem with nil rows returned in your previous release, can you please see if you can come up with a way of handling in V2.
Hi,
thanks for the explanation! Yes, I see why it’s difficult here, with the filters!
I already have an idea to prevent loading the JavaScript code in the scenario where a table has only one row. I’ll investigate that and then offer it as a fix!
Regards,
Tobias@tobiasbg Can you please help me on these pages:
https://www.pervasivedisplays.com/products/epd-product-selection/
https://www.pervasivedisplays.com/product/1-54-e-ink-display-spectra-r2-0/
I’ve unchecked the “Enable Visitor Features”.To @charmingsu. I am no expert but you could always try what worked for me. It could be the second table on your first page and the the table under the ICtab on your second page .
It looks like you have used colspan on the first row to give you space for that image. Colspan was what caused my problem.
Solution that workjed for me
I hid my row with the colspan in then saved the table. I then unhid that row and saved it. All was well after that. Worth a try. If not wait for tobias to get back to you
Hi @charmingsu,
sorry for the trouble! Indeed, as John mentions, the problem is the
#colspan#
in the table with the ID 4, which you added to be able to stretch the image over two columns.Using the combined cells means that you can not use the “Table Features for Site Visitors”, as the JavaScript code that is used for this is not compatible with tables that have combined cells.
Therefore, you must turn off the “Enable Visitor Features” checkbox for table 4.
Regards,
Tobiasi had the same error even though “enable visitor features” was already unticked.
I had to resave the page for it to actually take effect. The error went after resaving with no changes.
- The topic ‘Incorrect column count error with new version’ is closed to new replies.