Update button not firing with extend: 'savedStates'

Update button not firing with extend: 'savedStates'

jfixsenjfixsen Posts: 2Questions: 2Answers: 0

Hi Allan.

First, thanks for answering my question last Friday, datatables is amazing.

My question has to do with the savedStates. I am using functionality to save a state in the menu which lets the user name the state, then it calls the backend ajax script ss.php to save it to the database. After this happens, it shows in the menu, with an arrow on the right, that then gives 3 options to manipulate that particular saved state (update/rename/remove). My issue is that the "update" button is no longer firing my backend ss.php ajax script. I can see this by inspecting and going to the network tab, and also by monitoring input to the ss.php script. What's weird, is that it was working fine on Friday. Today, the only way to get it to fire is if I save a new state, and then immediately hit "update" without changing any criteria, but if I change anything in the criteria, it will not fire.

Here is a link to test case: https://www.mystockdata.com/dividend-search/

Its a demo app so it will not hurt anything to add/remove saved states.

You can add a "Saved Query" and then go back and try to update it, and the ajax ss.php script never gets called. Any idea what might be going on? The rename and remove buttons work just fine and will always post data to the server. I've also tried from multiple browsers and had a co-worker try from a different location all with the same behavior. Thanks in advance.


Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:


  • rmdrmd Posts: 4Questions: 1Answers: 0

    I can confirm this behaviour with a different setup using Python / Flask on the backend.

    The only time I can get a AJAX POST to the server for an 'update' action on a state is immediately after creating.

    Once a state is the result of loading from the backed as opposed to on-page creation the update action fails to fire hence upates to the state are lost upon a page reload.

  • allanallan Posts: 57,263Questions: 1Answers: 9,121 Site admin


    I missed this at the time - sorry! @jfixsen Could you possibly update the page to use the non-minified version of DataTables and StateRestore so I can debug what is happening there please?

    Or @rmd Perhaps you could link to your page with non-minified code?

    I've just tried experimenting a bit and it appears to be working in this example so I'm not sure what is going wrong yet I'm afraid.


Sign In or Register to comment.