DataTables 1.9.4 + AutoFill 1.1.2 -> strange behaviour after updating jQuery to 1.8.3+? [FIXED!]

DataTables 1.9.4 + AutoFill 1.1.2 -> strange behaviour after updating jQuery to 1.8.3+? [FIXED!]

mijkmijk Posts: 3Questions: 0Answers: 0
edited January 2013 in Bug reports
Hello everyone!
Since jQuery CDN has updated to version 1.8.3+ (somewhere betwen 1.8,3 and 1.9, I didn't follow the jQ updates last few weeks), I'm experiencing problems with latest jQuery DataTables compatibility (jQuery 1.8.2 was the last version that worked at all my production sites without experiencing any following issues).

Sadly - the combo of: [code]DataTables 1.9.4 + jQuery 1.8.3+/1.9[/code] seems to turn most of the jQuery goodness on all my sites (that utilises the combo) down (there seems to be no issues with the other jQuery scripts that I use - just to fyi).

I am not able to debug the issue (as the debuger seems to utilise some of XSS trickery to load the content up to server, I won't let it run if I didn't wrote the XSS myself ^^ and I also don't have spare time left to analyse the debuggers code for now...), and I can not find anyone else solving similar issue here nor anywhere (except some comments on DT not working with latest jQ versions at the jQ blog under the release announcement posts).

---

If I test DT 1.9.4 (even almost unmodified bundled examples) with latest jQuery libraries, sites do not seem to behave the same as before. Some pointers (FF's JS errorlog + firebug's error console) were showing to some issue with AutoFill, however I haven't had time to check the issue atm and quickly downgraded the jQuery version back to 1.8 for now as I needed the sites to function properly in no time...

FF ERROR CONSOLE LOG: only single js error is manifesting:
[code]Error: TypeError: e(...).live is not a function
Source file: /media/js/AutoFill.min.js
Line: 19[/code]

---

TEST CASE (My friends website that I'm running + modding in spare time for free)
---------
OK CASE: running jQuery 1.8, site and all scripts are working properly, to display the DT manipulated table click the BIG GRAY BUTTON above flexslider (that just unhides a div containing the table), gray button "CENIK" that floats on the right side of the page just under google maps iframe and all the contact gibberish:
[code]link removed as problem was already fixed[/code]

KO CASE: running jQuery 1.9, behaving STRANGE (everything else except the table - flexslider, some simple jquery div visibility, animation and size manipulations, a bit of scrolling - all that stuff (except nivozoom script and main DT functions) stopped working all of sudden after yesterdays jQ 1.9 update took place over at the jQuery CDN):
[code]link removed as problem was already fixed[/code]

---

The only difference in code of those two .php scripts is:

OK case: jQuery 1.8.0, served from code.jquery.com CDN (line 32), modified version of "jquery.dataTables.cs_CZ.min.js?v=1.9.4" (only an translated version of the original script without any additional modifications of the plugin codebase) (line 36)

KO case: a current stable version of jQuery, served from code.jquery.com CDN, loaded in the header (line 32), and usage of original, unmodified "jquery.dataTables.min.js?v=1.9.4" (line 36) for testing and analysis of the issue on the current, original and unmodified plugin codebase
---

Could anyone help me analyse the issue or even fix it? Is it just my coding syntax issue? My wrong coding practices with lot of anonymous fns all over the place? Or should I wait for an (possible) upcoming version that fixes it? Is someone else experiencing the same issues with the combo? Questions ;-)

Thanks in advance!

---
BTW: 42 is not an valid answer, I tested that ;-)

[quote]As of jQuery 1.7, the .live() method is deprecated. Use .on() to attach event handlers. Users of older versions of jQuery should use .delegate() in preference to .live().

$(selector).live(events, data, handler); // jQuery 1.3+

$(document).delegate(selector, events, data, handler); // jQuery 1.4.3+

$(document).on(events, selector, data, handler); // jQuery 1.7+

Please refer to the link below http://api.jquery.com/live/
[/quote]

Replies

  • mijkmijk Posts: 3Questions: 0Answers: 0
    edited January 2013
    Boy, this is funny.
    I suspected that the issue was tied with that .live bug that appeared in FF's console and I was right!

    When i simply got rid of AutoFill (yes, the admin will cry when he'll be about to manipulate multiple cells of the table one by one now ^^) and everything is working as expected on all my productions sites.

    ---

    Allan, take this, please, as an AutoFill bug report and let me thank you for all your precious time well spent on this awesome project! You rule!

    [code]http://datatables.net/extras/autofill/ needs a fix pretty bad![/code]

    ---
    CODE IS POETRY
  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    Thanks for highlighting this. I need to go through me entire code base / site and update all live() references for on(). Something I'd been planning on doing with the 1.10 release of DataTables, but obviously a bit more pressing with the release of jQuery 1.9 now (which removes 'live()').

    I've committed the required fix for AutoFill, which is now available on the downloads page as the nightly, or in the github repo ( http://datatables.net/download/ ).

    Regards.
    Allan
This discussion has been closed.