Ajax request specifying _ as the only query parameter?
Ajax request specifying _ as the only query parameter?

Hi, I'm sorry that this isn't a very fleshed out question, but when trying to set up data tables on a new project I'm encountering that instead of specifying the huge amount of query parameters an Ajax data table would, it just specifies _ as the only query parameter with a value of a random int. Is this a common issue? Is there some easy fix in the docs I'm missing? As far as I can tell, the table is configured correctly and the columns are correctly configured.
This discussion has been closed.
Answers
Sounds like you have
severSide
processing enabled. If you do then it will send the parameters specified in the Server Side Processing docs for each request.You can use the
ajax.data
to send additional parameters.Hope this answers your questions.
Kevin
Thanks for your answer, I don't think that helps me though sadly. I do have serverSide enabled, but the issue that I'm having is that it isn't sending the parameters specific in the server side processing docs, instead the only query parameter it is sending is an _. i.e.
/results/results/data_source/?_=1591009726466
here is my code if that helps:
That looks like it should work. Not sure about the
ajax.dataSrc
though. Wouldn't expect yourajax.dataSrc
to cause the problem you described but it may be problematic for server side processing to properly handle the response data. What isupdate_column_filters_from_ajax_data
?Can you post a link to your page or a test case replicating the issue. This will allow us to help troubleshoot.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
I copied your code into this test case:
http://live.datatables.net/mehobafe/1/edit
Made a couple changes for it to work but you can see it send the server side parameters.
Kevin
This is the dataSrc function:
I don't think it's this as the request is being made without query parameters so surely this would happen after the request and not affect it? I'll be able to post a test case later but I'm not currently able to.
As Kevin said, please post a test case of link to your page.
Colin