Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

CSRF error on form submission: "There seems to have been a technical problem. Please click the back button refresh your browser, and try again."


Go to End


11 Posts   9107 Views

Avatar
Nightjar

Community Member, 28 Posts

26 May 2015 at 10:09pm

Depending on the ... criticality (wow, apparently this is an actual word) of the form, you could disable the security token.
I don't particularly recommend it unless it's a search form or something like that though.

I take it Safari is actually submitting the SecurityID?
Because looking at the code it suggests that perhaps it's not. http://api.silverstripe.org/3.1/source-class-Form.html#281 ($vars being http://api.silverstripe.org/3.1/class-SS_HTTPRequest.html#_requestVars - ie, everything submitted)

If by 'similar' you mean it's showing the other error (timeout), you're either taking too long to fill out the form, or perhaps the session timeout is set too low for your needs (eg, when the form is huge). The only easy way around that is to increase the session timeout for that site.

Avatar
mediabeastnz

Community Member, 10 Posts

26 May 2015 at 10:16pm

Thanks @Nightjar, I realised after posting that I was sending the SecurityID as hidden field for some silly reason and it must of been causing a mismatch.

Would be cool to get a more descriptive error though (if in dev mode).

Avatar
Nightjar

Community Member, 28 Posts

26 May 2015 at 10:48pm

Myles,
1) Why are you working so late?
2) Hidden field shouldn't matter, as hidden fields are still valid for submission. Unless because it's late you meant disabled, then yeah, that would be a bit silly.
3) Yeah you're probably right. Submit a pull request! :P

Go to Top