FixedHeader nightly: exception with Prototype 1.7 and jQuery 1.4.4

FixedHeader nightly: exception with Prototype 1.7 and jQuery 1.4.4

MiBMiB Posts: 15Questions: 0Answers: 0
edited February 2013 in Bug reports
Hi Allan,

I have yet another crash with Prototype 1.7 and jQuery 1.4.4: using just datatables 1.9.4 and nightly FixedHeader, I get

TypeError: this._each is not a function

when clicking on any header. It still does the sorting but dragging in case of loading ColReorder is not possible anymore.

Any ideas?

Thanks a lot!

[code]



DataTables




jQuery.noConflict();





jQuery(document).ready(function() {
var t = jQuery('#example1').dataTable( {
"bPaginate": false,
"bInfo" : false,
"bAutoWidth" : true,
"aoColumnDefs" : [
// do not display the internal id and status id columns
{ "bSearchable": false, "bVisible": false, "aTargets": [ "ID", "STATUS_ID" ] },
// when sorting the Status column, use the internal status id column
{ "iDataSort": [ 1 ], "aTargets": [ 2 ] }
],
"aaSorting": [[2,'desc']], // initial sorting by status column
"bStateSave" : true,
"sDom" : 'TRlrt'
});
new FixedHeader(t);
});


[/code]

Replies

  • allanallan Posts: 63,685Questions: 1Answers: 10,498 Site admin
    And it works without Prototype again? What about with the latest Prototype (1.7.1)? What is the back trace? Can you link to an example test case?

    Allan
  • MiBMiB Posts: 15Questions: 0Answers: 0
    Yes, this time I can link to an example - I found live.datatables.net!! :-)
    http://live.datatables.net/amagaf
    And no, Prototype 1.7.0 and 1.7.1 don't work. jQuery 1.4.1 works, but I cannot use it due to a bug in IE. jQuery 1.4.2 through 1.4.4 fail, exactly the versions I am stuck with.
  • MiBMiB Posts: 15Questions: 0Answers: 0
    PS: Oh, and yes, without prototype it works again - regardless of jQuery.
  • allanallan Posts: 63,685Questions: 1Answers: 10,498 Site admin
    Thanks for the link. It appears to work no problem for me when I load it in Safari. Is it a certain browser / platform that has the problem only?
  • MiBMiB Posts: 15Questions: 0Answers: 0
    Gee.. I hope not, but I have no idea. It breaks in Firefox and Chrome on Linux and IE10 on Windows. ... hm... BTW, just in case: the error happens if you *click* on a header. You did do that, right? :)
  • allanallan Posts: 63,685Questions: 1Answers: 10,498 Site admin
    Doh - no I didn't :-).

    Yup, Safari Mac shows the same problem.

    I'm afraid this is nothing to do with FixedHeader or DataTables - its an incompatibility between jQuery 1.4 and Prototype. Its a problem in the 'clone' method when cloning with data and events. Here is an example: http://live.datatables.net/amagaf/2/edit . Click the second '123' and you'll get the same error.

    Sorry, but I'd suggest updating to a newer jQuery.

    Allan
  • MiBMiB Posts: 15Questions: 0Answers: 0
    oh no :-( Maybe I'll find a workaround... I am not sure I can have RichFaces 3 with jQuery >1.4.4 as 1.5 is incompatible regarding ajax calls, as far as I can see.

    Thanks a lot for the testcase and the investigation!
This discussion has been closed.