Problem with initialization: aLayout[0] is undefined

Problem with initialization: aLayout[0] is undefined

batch2kbatch2k Posts: 6Questions: 0Answers: 0
edited September 2009 in Bug reports
Suddenly (probably, after some manipulations with page) dataTables plugin got failed to initialize, and only if FF (!) (My version is 3.5).
In Firebug I see as the language file gets loaded, and after that -- "aLayout[0] is undefined" (in line 4243) ("for ( i=0, iLen=aLayout[0].length ; i

Replies

  • allanallan Posts: 62,099Questions: 1Answers: 10,183 Site admin
    Hi batch2k,

    It's almost certainly something to do with the thead element in your table - could you perhaps post that? Are you using 1.5.2? There was a fix that went in for some edge behaviour with a td row before th elements.

    Regards,
    Allan
  • batch2kbatch2k Posts: 6Questions: 0Answers: 0
    This is the :
    [code]

    ...
    ...
    ...
    ...

    [/code]
    Two middle columns are hidden and are being used only for search purposes. And, actually, this error appeared AFTER I updated to 1.5.2.
  • allanallan Posts: 62,099Questions: 1Answers: 10,183 Site admin
    Hi,

    Doesn't look like valid HTML. It should be:

    [code]


    ...
    ...
    ...
    ...


    [/code]
    Probably worth running your page through the W3C validator.

    Regards,
    Allan
  • batch2kbatch2k Posts: 6Questions: 0Answers: 0
    Wow. That works! Thank you!
    Probably previous version allowed that incorrect syntax; and other browsers might somehow pass by that inaccuracy :-)
  • allanallan Posts: 62,099Questions: 1Answers: 10,183 Site admin
    Hi batch2k,

    I think that some browsers will actively modify the live DOM that has been read in to make it valid - how it transforms from the invalid input to the valid rendering is probably a bit of dark art :-). So some browsers might have inserted the TR, because it's layout engine would need it. That's my guess anyway!

    Allan
This discussion has been closed.