Cannot read property 'style' of undefined...

Cannot read property 'style' of undefined...

th3t1ckth3t1ck Posts: 228Questions: 37Answers: 1

I am having trouble with one page that has left joins. I have a similar page that works just fine. I have compared the two side by side and I cannot find anything that would cause a problem. Some of the errors I see in the console are as follows;

 jQuery.Deferred exception: Cannot read property 'style' of undefined TypeError: Cannot read property 'style' of undefined   datatables.min.js:14
    at Ja (https://www.dhwebapps.com/dev/FCMS/DataTables/datatables.min.js:127:169)
    at ja (https://www.dhwebapps.com/dev/FCMS/DataTables/datatables.min.js:113:63)
    at e (https://www.dhwebapps.com/dev/FCMS/DataTables/datatables.min.js:157:112)
    at b (https://www.dhwebapps.com/dev/FCMS/DataTables/datatables.min.js:138:219)
    at Ob (https://www.dhwebapps.com/dev/FCMS/DataTables/datatables.min.js:138:308)
    at HTMLTableElement.<anonymous> (https://www.dhwebapps.com/dev/FCMS/DataTables/datatables.min.js:157:187)
    at Function.each (https://www.dhwebapps.com/dev/FCMS/DataTables/datatables.min.js:14:2573)
    at w.fn.init.each (https://www.dhwebapps.com/dev/FCMS/DataTables/datatables.min.js:14:1240)
    at w.fn.init.q [as dataTable] (https://www.dhwebapps.com/dev/FCMS/DataTables/datatables.min.js:147:388)
    at w.fn.init.f.fn.DataTable (https://www.dhwebapps.com/dev/FCMS/DataTables/datatable can s.min.js:230:488) undefined

I can send an account and password via PM if needed.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Answer ✓

    When I've seen this error before its because the number of columns defined in the JS doesn't match the number of column in the HTML for the table. Or possibly the header / footer don't match the tbody.

    If that doesn't help resolve it, then yes please, PM me details so I can see it.

    Thanks,
    Allan

  • rf1234rf1234 Posts: 2,991Questions: 87Answers: 421

    As a "heavy user" I can confirm this. Happens about every week when I forget something ...
    @allan: Do you see a possibility of getting a better error message for this?

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    Absolutely. It is on the radar (just not sure when it will happen yet I'm afraid).

    Allan

  • th3t1ckth3t1ck Posts: 228Questions: 37Answers: 1

    Thank you folks. I always appreciate the feedback. There is probably something I have overlooked in the code as you have stated. I'll check it out tomorrow and get back to you. It seems very likely that is the problem since I have another page that works fine as I mentioned in my original question.

  • th3t1ckth3t1ck Posts: 228Questions: 37Answers: 1

    So it looks like this was the culprit -

                { visible: false, targets: 0 },
                { data: 'cases.id',
                    visible: false
                },
                { data: 'seq',
                    visible: false
                },
    

    I was trying to get rowReorder working at one point and added this in to hide the index. Thanks again for the help folks.

This discussion has been closed.