Ajax error 7 - revisited
Ajax error 7 - revisited
bonaventure
Posts: 15Questions: 7Answers: 0
Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:
datatables adds parameters to AJAX URL
http://localhost:8081/DEMO/lessoninstances/47?_=1703245475489
should be
http://localhost:8081/DEMO/lessoninstances/47
thus returning rtc 400 from server (bad request)
This only happens with french locale and only with certain data.
Parameter ?_=1703245475489 changes with each call.
Cannot use locale FR until sulution.
kind regards
Replies
The
_
parameter is the jQuery anti-cache parameter. Se thecache
option forajax
to true - i.e.:Allan
ok, thanks, I added cache:true, so the ?1_xxxx is gone, but not the 400
This raised the question why this is happening only sometimes, and only with locale FR.
I found out that it happens independently from datatables, so I also get a 400 when I put the URL in the browser manually.
weird
Perhaps something to do with the headers? Check the difference between the headers of a successful request and a failed request. Then use cURL to recreate the request on the command line so you can reproduce and debug the server-side script.
Allan
found it.
message_fr.properties contains:
lis.scheduleText={0} { 1}, {2}- {3}
resource replacement parameter with a leading blank.
Cool. Good to hear you've got it sorted.
Allan