Datatable launch two requests instead of only one

Datatable launch two requests instead of only one

MikeFRMikeFR Posts: 4Questions: 2Answers: 0

I am using Symfony Bundle Datatable to generate my Datatable.

When I try to pass arguments inside the URL, Datatable launch two time the request:

The request he has to do: http://v2.extranet.apivia-courtage.vm/tarificateurs/iard/protection-juridique-particulier/?dates=2023-07-06,2023-07-09

Then a second one automatically called with other parameters: http://v2.extranet.apivia-courtage.vm/tarificateurs/iard/protection-juridique-particulier/?_dt=dt&_init=true

So my resarch is lost and I don't have the data I am expecting for.
Does someone know where comes from that bug?

Thank you.

Answers

  • kthorngrenkthorngren Posts: 21,336Questions: 26Answers: 4,953

    Its hard to say what the problem might be without seeing it happen. At a minimum please post your relevant Datatables code. Maybe we can spot something obvious. Better is a link to your page or a test case replicating the issue so we can help debug.
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Kevin

  • MikeFRMikeFR Posts: 4Questions: 2Answers: 0

    Thank you @kthorngren

    Here is some screenshots to explain.

    My data is empty but generate the table with the data.

    And then you can see that it's because there is two requests.
    One with the params expected and the second launched automatically with params:

    And it's that second one that creates the bug. How can I stop it?

    Thank you.

  • kthorngrenkthorngren Posts: 21,336Questions: 26Answers: 4,953

    Sorry but screenshots are not enough for us to understand hwo your code flow works. Please, either post the relevant Datatables code or better is a link to your page so we can see the code in action.

    Kevin

Sign In or Register to comment.