• Resolved philipt18

    (@philipt18)


    I have several tables on my site that all work fine, but a new table I’m trying to add isn’t working. None of the JS features like pagination, search, sorting, etc. are present. Is it possible those features don’t work in Preview? I am hesitant to publish it until I can get it working properly. Other than viewing it in a Preview, I’m not sure what is different between this table and others on the site that work. Thanks.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Correct, the JavaScript features are not available in the table preview (but only in the page preview and the published page).

    Is the table maybe using combined/merged cells via the #colspan# or #rowspan# keywords? This would also result in the JS features not working, as the external JS library that TablePress uses does not support that.

    Regards,
    Tobias

    Thread Starter philipt18

    (@philipt18)

    Hmmm. I published the post and it’s still missing the Javascript features. There are no colspan or rowspan keywords. I now see you said it should show up in the page preview, but it did not. Here’s the post: https://bloodandfrogs.com/2022/02/an-ultra-orthdox-view-of-jewish-names.html Any idea what is going on?

    I have same trouble on client site and on new default WP installation.

    Firefox console:

    Uncaught TypeError: e is undefined
        jQuery 12
        <anonymous> https://site.local/tablica/:192

    Chrome console:

    Uncaught TypeError: Cannot set properties of undefined (setting '_DT_CellIndex')
        at $a (jquery.datatables.min.js?ver=1.14:31:21)
        at ea (jquery.datatables.min.js?ver=1.14:22:467)
        at HTMLTableRowElement.<anonymous> (jquery.datatables.min.js?ver=1.14:23:79)
        at jquery.min.js?ver=3.6.0:2:1567
        at Function.map (jquery.min.js?ver=3.6.0:2:3536)
        at s.fn.init.map (jquery.min.js?ver=3.6.0:2:1535)
        at Ha (jquery.datatables.min.js?ver=1.14:23:44)
        at f (jquery.datatables.min.js?ver=1.14:99:307)
        at HTMLTableElement.<anonymous> (jquery.datatables.min.js?ver=1.14:99:490)
        at Function.each (jquery.min.js?ver=3.6.0:2:3003)
    • This reply was modified 2 years, 9 months ago by brain8torm.
    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    philipt18: Thanks for the link! The problem is in line 7 of the table (??? ????? ?????). There, the link HTML code is missing the text and the closing </a> tag. This breaks the table DOM structure so that the JS features can’t work.
    There are few more similar errors, see https://validator.w3.org/nu/?doc=https%3A%2F%2Fbloodandfrogs.com%2F2022%2F02%2Fan-ultra-orthdox-view-of-jewish-names.html
    For example, there’s a case where the " after the URL is missing, or where the = between the href and the "https:... is missing.

    brain8torm: If your table also does not use the #colspan# or #rowspan# keywords, there’s also some invalid HTML code like in the case above. I would also recommend to check the page HTML with the W3 Validator at https://validator.w3.org/ .

    Regards,
    Tobias

    Plugin tested on empty website with theme Twenty Twenty-One with simple table without #colspan# or #rowspan#

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    Can you please post a link to the page with the table where this problem happens, so that I can take a direct look (or provide the table as an exported CSV file)? Thanks!
    The error message indicates that some cells are missing, which is the used language for “invalid HTML code” in one of the cells (because this spills into adjacent cells and thus breaks the table HTML code).

    Regards,
    Tobias

    sorry. it’s working. colspan found.
    Then colspan can only be used without activating Datatables.
    How then to use colspan to create table partitions?

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    Indeed, #colspan# and #rowspan# can only be used when the “Use DataTables” checkbox is turned off. This is a limitation of the external DataTables JavaScript library that TablePress uses.
    Unfortunately, I’m not aware of a way to use the JS features in a table that has combined/merged cells. Sorry.

    Regards,
    Tobias

    Thread Starter philipt18

    (@philipt18)

    Thank you, I’ll fix those. That’s what happens when you decide to hand code a few links to save time.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Good to hear that this helped!

    Best wishes,
    Tobias
    ?
    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Javascript features not working on one table’ is closed to new replies.