Problems with fnReloadAjax erroring with oSettings is null

Problems with fnReloadAjax erroring with oSettings is null

hottigerhottiger Posts: 5Questions: 0Answers: 0
edited May 2012 in DataTables 1.9
Hi,

I currently have DataTables fetching content, I then observe an onchange event on a select menu and call fnReloadAjax with a new url.

I then do a history pushState to another page and load in some html via ajax, replacing the DataTable with something else.

However when I come back to that page (again via a pushState event) and call fnReloadAjax via the select menu I get the error:

oSettings is null
fnReloadAjax(oSettings=null, sNewSource="/some_url/").

I tried calling the fnReloadAjax function again after my ajax request but that didn't help.

Has anybody ever encountered this? I'll try and get an example up later on.

Thanks

Replies

  • allanallan Posts: 61,774Questions: 1Answers: 10,112 Site admin
    Hi,

    When you come back to your page, what is in the array $.fn.dataTableSettings ? That is the array that holds all DataTables settings objects, so if that is empty then something has deleted it (destroying the table?).

    Allan
  • hottigerhottiger Posts: 5Questions: 0Answers: 0
    Hi allan,

    There is data in $.fn.dataTableSettings, when comparing it to when it works I can't see any (obvious) difference. I'll hopefully get an example up tomorrow.

    Thanks
  • hottigerhottiger Posts: 5Questions: 0Answers: 0
    I've got an example up:

    http://staging.hottiger.co.uk/cms/content

    Change a category and it works fine, then click on create article and then back and try again.
This discussion has been closed.