EllisLab text mark
Advanced Search
     
upgrade 2.1.2 to 2.1.3 ajax error
Posted: 08 October 2012 04:30 PM   [ Ignore ]
Joined: 2010-05-10
21 posts

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.

An Error Was EncounteredThe action you have requested is not allowed

I know this is csrf and if I turned it off it works. Any ideas why?

 Signature 

JComp

 
Posted: 08 October 2012 07:58 PM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2011-08-08
524 posts

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

 Signature 

Stick with it, practice it and have fun with it.

 
Posted: 08 October 2012 08:22 PM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Avatar
Joined: 2009-05-17
1415 posts

Community Auth, which has a few ajax calls, has stopped working when csrf_protection is enabled. 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.

UPDATE: It was my code. There’s nothing wrong with CodeIgniter.

 Signature 

Brian
Brian’s Web Design - Temecula
Community Auth - CodeIgniter Authentication Application

 
Posted: 09 October 2012 02:27 AM   [ Ignore ]   [ # 3 ]   [ Rating: 0 ]
Joined: 2010-05-10
21 posts

Thanks for anwsers. Where can I see when bug is gonna to be fiexed?

 Signature 

JComp

 
Posted: 09 October 2012 03:48 AM   [ Ignore ]   [ # 4 ]   [ Rating: 0 ]
Avatar
Joined: 2009-05-17
1415 posts
valuk - 09 October 2012 02:27 AM

Thanks for anwsers. Where can I see when bug is gonna to be fiexed?

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.

 Signature 

Brian
Brian’s Web Design - Temecula
Community Auth - CodeIgniter Authentication Application

 
Posted: 09 October 2012 04:22 AM   [ Ignore ]   [ # 5 ]   [ Rating: 0 ]
Joined: 2010-05-10
21 posts

Ok sorry and thanks.

 Signature 

JComp

 
Posted: 17 October 2012 07:29 PM   [ Ignore ]   [ # 6 ]   [ Rating: 0 ]
Avatar
Joined: 2011-09-07
19 posts

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.

 Signature 
 
Posted: 17 October 2012 09:02 PM   [ Ignore ]   [ # 7 ]   [ Rating: 0 ]
Avatar
Joined: 2009-05-17
1415 posts
elite-board - 17 October 2012 07:29 PM

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.

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?

 Signature 

Brian
Brian’s Web Design - Temecula
Community Auth - CodeIgniter Authentication Application

 
Posted: 18 October 2012 08:00 AM   [ Ignore ]   [ # 8 ]   [ Rating: 0 ]
Avatar
Joined: 2011-09-07
19 posts

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.

 Signature 
 
Posted: 19 October 2012 12:00 PM   [ Ignore ]   [ # 9 ]   [ Rating: 0 ]
Avatar
Joined: 2011-09-07
19 posts

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.

 Signature