Welcome Guest, Not a member yet? Register   Sign In
upgrade 2.1.2 to 2.1.3 ajax error
#1

[eluser]valuk[/eluser]
Hi,

I upgraded from 2.1.2 to 2.1.3 and now I get this error on ajax call. In version 2.1.2 I haven't encunetered this error.

Code:
An Error Was Encountered. The action you have requested is not allowed.
I know this is csrf and if I turned it off it works. Any ideas why?
#2

[eluser]solid9[/eluser]
If you think this is a bug.
Post it here,
http://ellislab.com/forums/viewforum/51/

#3

[eluser]skunkbad[/eluser]
Community Auth, which has a few ajax calls, has stopped working when csrf_protection is enabled. [strike]So, there is for sure a bug. I'll try to see if I can fix it later. I don't have time right now.[/strike]

UPDATE: It was my code. There's nothing wrong with CodeIgniter.
#4

[eluser]valuk[/eluser]
Thanks for anwsers. Where can I see when bug is gonna to be fiexed?
#5

[eluser]skunkbad[/eluser]
[quote author="valuk" date="1349764035"]Thanks for anwsers. Where can I see when bug is gonna to be fiexed?[/quote]

What I was saying is that there is no bug. In my case, it was my code. I wasn't properly sending the CI CSRF token along with my ajax request, but fixed the instances where that was the problem, and everything is working fine. There's nothing wrong with CI 2.1.3.
#6

[eluser]valuk[/eluser]
Ok sorry and thanks.
#7

[eluser]elite-board[/eluser]
I placed a bug report as I'm having the same issue and want to just double check. I'd hate to be forced to find a new jquery plugin because of a CI bug, especially when a decent grid plugin is a royal pain to find.
#8

[eluser]skunkbad[/eluser]
[quote author="elite-board" date="1350516565"]I placed a bug report as I'm having the same issue and want to just double check. I'd hate to be forced to find a new jquery plugin because of a CI bug, especially when a decent grid plugin is a royal pain to find.[/quote]

What jquery plugin are you using, and how are you using it? Does it fire off multiple requests at once? Can you reproduce the problem using a siimple code?
#9

[eluser]elite-board[/eluser]
I'm using jTables(http://www.jtable.org/), its a grid plugin.

all it does is call a controller action that has a sql command (which is in a model). it uses GET to handle things like paging, sorting, etc. which I use $this->input->get() to get those values.

the code itself is simple.

I have other ajax code that works fine, but its also homebrewed so I built it to handle CI's CSRF.

I'm willing to use another grid plugin if i have to, but I'd really prefer not to as this suit my needs the best out of the limited choices out there. I probably go through the plugin's code tonight and see if I can tweak it.
#10

[eluser]elite-board[/eluser]
I fixed the problem.

the script's author says the load is in GET, but the code has it fixed to do POST no matter what. I altered the ajax call to go one or the other depending on what its doing and now its working again Smile

so it seems to not be a bug, just poor plugin documentation lol.




Theme © iAndrew 2016 - Forum software by © MyBB