Join us for EEConf 2023, October 4-5 in Orlando. Speakers. Networking. Community powered. Awesome.
Join us for EEConf 2023, October 4-5 in Orlando.Register Now!
I am getting the dreaded
Error: This form has expired. Please refresh and try again. error message, while trying to edit a particular template (I can edit others successfully).
Edit: looking through the server logs, identified the problem:
AH01071: Got error 'PHP message: PHP Warning: Unknown: Unable to create temporary file, Check permissions in temporary files directory. in Unknown on line 0PHP message: PHP Warning: Unknown: POST data can't be buffered; all data discarded in Unknown on line 0', referer: https://REDACTED?/cp/design/template/edit/28
Waiting for my server guy to be available, but what would be the temporary files directory?
Hrm- it’s odd to me it’s only 1 template, but that may be a misdirection. I think this link has some good posibilities: https://www.kopf.com.br/kaplof/how-to-fix-php-warning-unknown-post-data-cant-be-buffered-all-data-discarded-in-unknown-on-line-0/
I’d first try just putting something small and simple in the template ‘hello world’ and see if that saves ok.
If it does… I’d have server guru check temp space, could be full. I’d check security logs, make sure it’s not getting caught in a mod_security filter type thing- sometimes that does weird stuff.
Sometimes, I’ll just make a standalone html form that just posts back to itself and post the contents- see if you run into the problem. If so, you know it’s the server objecting to something in the content itself. That would be my bet, but it’s a quick way to test. (I usually make it php, post back to self, and dump the $_POST data just to see, but that’s not necessary.
Forgot to update this one. I’m checking the link you posted and I will try to do that today.
In this case, I upgraded the PHP version of the site, then downgraded it, and the error was gone. But I’m afraid the temp directory issue will pop-up again, so I have to fix it.