Undefined parameter json in fnInitComplete

Undefined parameter json in fnInitComplete

pascaldimassimopascaldimassimo Posts: 2Questions: 0Answers: 0
edited June 2013 in Bug reports
Hi,

I'm using DataTables 1.9.4. I tried to use fnInitComplete and noticed that the json parameter (2nd parameter) is always undefined. I've seen that parameter on the callback page (http://datatables.net/usage/callbacks) where it shows an example usage of fnInitComplete.

I traced the source and saw that the json parameter is not passed to _fnDraw nor to _fnInitComplete. I've modified the source locally to pass json to those functions and I now have access to the json object in fnInitComplete.

Thanks for this great product!

Replies

  • allanallan Posts: 55,114Questions: 1Answers: 8,654 Site admin
    Are you using server-side processing? This is a bug in DataTables 1.9-, which I've resolved in git. It absolutely should pass through the json to fnInitComplete.

    Allan
  • pascaldimassimopascaldimassimo Posts: 2Questions: 0Answers: 0
    Allan,

    Yes, I'm using server-side processing. When I have a chance, I'll try the git code.

    Thanks!
  • vttimcvttimc Posts: 1Questions: 0Answers: 0

    I'm having the exact same issue. I just went and pulled the latest 1.9.4 code from git (via https://raw.githubusercontent.com/DataTables/DataTables/RELEASE_1_9_4/media/js/jquery.dataTables.js ) but no dice.

    What version of the code has the fix? Do I have to upgrade to 1.10? Not quite sure I'm ready to take the step yet...

This discussion has been closed.