• Resolved Kenner82

    (@kenner82)


    I have 2 tables that I set up to use the Fixed Headers and Filter Tables extensions, and it works perfectly on 1 page (http://www.paddedtushstats.com/reviews/) and isn’t working on the other (http://www.paddedtushstats.com/retailer-database/). The only difference is that on the second page I had set up certain columns to not display by using “aoColumnDefs”: [ { “bVisible”: false, “aTargets”: [1,5,7,8] } ] in the Custom Commands section. It had been working perfectly and I was very excited about it, but when I went back to continue working on the project later in the day, it looked the way it does now. It’s been a few days now and I’ve tried all the troubleshooting suggestions I could find, but I’m mostly baffled why it works on one page and not the other.

    Do you have any suggestions on what could be happening?

    https://wordpress.org/plugins/tablepress/

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

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    From what I can see, you’ll just have to modify the numbers in that “Custom Command” a little bit: Due to how the JavaScript code works, one has to start counting the columns with 0 instead of 1, i.e. the first column is the number 0, the second one is the number 1, and so on.
    Can you therefore please try again with this “Custom Command”?:

    "aoColumnDefs": [ { "bVisible": false, "aTargets": [0,4,6,7] } ]

    Regards,
    Tobias

    Thread Starter Kenner82

    (@kenner82)

    I spent DAYS trying to figure this out before starting this thread, and now I see the problem – I knew to start counting the columns at 0, so that part I had mostly right, but then I referenced a column 8 which didn’t exist (I think I’d had a blank column there at one point and then deleted it, which is when it probably stopped working).

    So thank you for accidentally helping me, and I’m so sorry for spending your time on something I should have seen on my own!

    (And also thank you for these extensions you’ve made available! I don’t know when you released them but they’re pretty much blowing my mind and making things possible that we’ve wanted for YEARS but hadn’t been able to implement!)

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! 🙂 Good to hear that this helped!
    And yes, that 8 made the JS library look for a ninth column – which isn’t there, and therefore it bails out.

    Good to hear that you like the Extensions! 🙂 They have been there for some time, but I haven’t really been advertising them too much. I probably should 🙂

    And thanks for already leaving a review for TablePress a while ago, I really appreciate that! If there’s anything else I can do to earn a fifth star in your rating, please let me know!

    Best wishes,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Extensions Working Properly On Only 1 Page’ is closed to new replies.