-
Notifications
You must be signed in to change notification settings - Fork 166
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
Major Advanced File Uploader Bug - doesn't work on Mac OS & Safari #2514
Comments
UPDATE: Just WP 4.9.5, Twenty Seventeen Theme and Caldera 1.6.1.1. nothing else. Problem stays. Please make a repair ASAP. It makes the forms with advanced upload fields unusable on Mac. And it's not just UI problem, the data aren't submitted either. |
Thanks for the details. Looks like the file upload request works fine, but then Safari is getting a 400 error from nginx (on your test site and in my local test environment) for the form submit request. It's never gets to WordPress at all when making the request to upload. This is probably going to require rewriting form submission from scratch. Fuck. |
Ouch, sounds like bad news. :( As a workaround, I would be fine using the simple uploader, but it has it's own bug too. It won't allow selecting multiple files. Even though I check corresponding option, the attribute "multiple" is not added to the input tag code. And one more question concerning simple uploader - what is the real purpose of the extra button "Add Files", which is added, when selecting Multiple? Thanks |
Same major problem with WP 4.9.6. Caldera Forms 1.6.3. Not possible to use advanced file upload from Chrome nor FireFox. Some of help? Only simple file upload works. Worried about new customers arriving to the web, not proper image of our enterprise and possible leads missing... |
I am done with GDPR stuff and back to this.Here is what I know
TheoriesIf a file upload field is in the form we create a new This least invasive fix would be to change how that works. Also: We have But in the docs for Safari they say to do |
Notes on my call with Bluma:
Proposed solution: I need to either modify how formData is created or how the file field changes after submission. Goal is to prevent uploading octet stream again, but to keep control linked.
|
Both the hidden field with control (bottom) and the file field with the file have the same name. 87% sure that's the issue Possible places I broke this:
|
So, the actual problem is that in the request to submit the form sends in POST request for that field the file (not needed) and the control ID we need for this to actually work. That's bad, Chrome handles it in a way that nGinx can make sense of the way we want it to, and the way Safari and Edge send it, shit goes wrong. I hate how simple the solution I have is. But, once the file is uploaded we don't need it anyway, even if the validation fails, because the data is already on the server. We need to clear the file field out before form serialization happens. So, once the file is pushed into the upload, we can turn the hidden file field that advanced file upload UI is wrapped around into a hidden field, and empty it's value. NOTE TO FUTURE SELF: Always use |
🌋 This should be fixed via #2588 🌋 |
Do not transmit file field data again, preventing submission on Safari and Edge Fixes #2514
🔥 🌋 Close via #2588 |
What Version Of Caldera Forms, WordPress and PHP Are You Using?
WordPress Version: 4.9.5PHP Version: 7.1.17MySQL Version: 10.1.26Caldera Forms Version: 1.6.1.1WP_DEBUG:
What Is The Unexpected Behaviour?
When my client (on Mac OS & Safari) tried to send the form here: https://www.humangarden.com/test-web/obsazovane-pozice/, form get stucked after submitting. It happened just in Safari, in Chrome it was OK. When I switched the field to simple (non advanced) uploader, it was OK.
On the other hand, while using simple uploader I'm unable to send multiple files, even though this option is checked.
What PHP Errors Have You Logged While Reproducing This Bug?
Unfortunately I'm on Windows and client is unable to provide this info.
What JavaScript Errors Have You Seen While Reproducing This Bug?
Unfortunately I'm on Windows and client is unable to provide this info.
The text was updated successfully, but these errors were encountered: