-
Notifications
You must be signed in to change notification settings - Fork 819
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CSRF Token Expired Expired causes a crash in GridField Item Requests #7266
Comments
+1 We've been seeing this issue on one of our sites for a little while, but have been unable to pinpoint the exact cause. |
It's the call to redirectBack() in Form, the only fix I can think of would be to define a wrapper in GridFieldDetailForm_ItemRequest that calls the top level contoller's redirect back. |
Makes total sense. It's been a pain to troubleshoot, since we have thus far been unable to reliably reproduce. Glad to see a well-known name in the SS community reporting this issue. |
the fundamental issue is really that the this is a duplicate of #3760 |
#3760 was a bug for the v4 series, though, and has already been fixed. This bug affects the v3 series, and is still an issue. Therefore, I don't think this bug should've been closed. |
@jchenevey that issue was reported in 2015, long before the real development of 4 started. It's been closed because the issue is fixed in 4 (there are a lot of issues in 3 which are being closed as fixed in 4 because the effort vs reward of fixing in 3 isn't there). If someone wishes to move |
see #3760 (comment) |
In 3.6.1(and I'm assuming previous 3.x chain) if the CSRF token expires (or does not match) the page will crash rather than displaying the CSRF expired message. The crash is caused in the Form class on line 383 where it calls controller redirectback. I think a potential fix would be to simply define
redirectBack
inGridFieldDetailForm_ItemRequest
wrapping the top level controller's redirect back.Full Error:
[Error] Uncaught Exception: Object->__call(): the method 'redirectback' does not exist on 'GridFieldDetailForm_ItemRequest', or the method is not public.
framework/core/Object.php:780
Form.php:383
Form.php:383
RequestHandler.php:288
RequestHandler.php:200
RequestHandler.php:222
GridFieldDetailForm.php:102
GridField.php:981
RequestHandler.php:222
RequestHandler.php:222
Controller.php:158
LeftAndMain.php:464
AdminRootController.php:92
Director.php:385
Director.php:149
main.php:191
The text was updated successfully, but these errors were encountered: