CodeIgniter Forums
upgrade 2.1.2 to 2.1.3 ajax error - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: upgrade 2.1.2 to 2.1.3 ajax error (/thread-55269.html)



upgrade 2.1.2 to 2.1.3 ajax error - El Forum - 10-17-2012

[eluser]elite-board[/eluser]
hi,

I'm not sure if this is a bug or not but I updated to v2.1.3 and now an AJAX command that worked before is no longer working.

I'm using a jquery plugin called jTables and to load the grid it uses GET to get the data it needs and that requires me using $this->input->get()

before it worked just fine, but now it is not working.

if the bug was $this->input->get() wasn't getting checked, then I guess its not a bug, and I'm going to have to find a way to get past that shortcoming. (so can't wait for CI 3 to be released Big Grin for better handling on CSRF)

Thanks.


upgrade 2.1.2 to 2.1.3 ajax error - El Forum - 10-18-2012

[eluser]Narf[/eluser]
My guess is that your AJAX request is sent via the POST method, but doesn't really send any POST fields. One of the changes in CI 2.1.3 is to set a CSRF cookie only on non-POST requests, while in 2.1.2 it used to set it if there was simply no POST data sent in the request.


upgrade 2.1.2 to 2.1.3 ajax error - El Forum - 10-18-2012

[eluser]elite-board[/eluser]
looked at the code and indeed it is.

I'll have to modify the plugin I'm using to adjust it so its not doing that.


upgrade 2.1.2 to 2.1.3 ajax error - El Forum - 10-19-2012

[eluser]elite-board[/eluser]
my problem is solved, so feel free to close this topic you so wish to, it was the plugins fault, not CI.