Skip to content
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

Upload fields don't store new uploads properly when there are validation errors #853

Closed
zackkatz opened this issue Mar 2, 2017 · 8 comments

Comments

@zackkatz
Copy link
Member

zackkatz commented Mar 2, 2017

Context: The Edit Entry screen with any required field and a file upload field.
If the user selects a file and submits the form while a required field is empty, the update will fail (as expected).
However, when the page reloads, the file upload input isn't cleared.
That leads to confusion as the file isn't available anymore and must be uploaded again to be saved:

To reproduce:

Single File Upload Field:

This issue exists in 1.19.4

  1. Upload a file
  2. Enter an error in a field
  3. Save the form
  4. The file appears uploaded
  5. Submit the form again
  6. The file is no longer there

Multiple File Upload Field:

This issue does not exist in 1.19.4

  1. Upload file
  2. Enter an error in a field
  3. Save the form
  4. The file is no longer there

Links to examples:

Video: https://monosnap.com/direct/YbEjhxEoccpX2Kn7ePErSTEWBKreQX

@zackkatz zackkatz changed the title Upload fields don't store properly when there are validation errors Upload fields don't store new uploads properly when there are validation errors Mar 2, 2017
@zackkatz
Copy link
Member Author

zackkatz commented Mar 2, 2017

Changes in Product fields are also not stored when there are validation errors.

@jakejackson1
Copy link
Collaborator

Ran into this problem today. Seems like GravityView is moving the uploaded files from their temporary home to the GF upload directory before the validation is done, instead of after. So when validation fails, Gravity Forms expects them to still be in the temporary folder and can't find them.

@aaronkine
Copy link

Following this thread in hopes of a fix.

@rafaehlers
Copy link
Contributor

@rafaehlers
Copy link
Contributor

Still happening on GFs 2.7.2 and GV 2.17.1

@floatytheastronaut
Copy link

@rafaehlers
Copy link
Contributor

rafaehlers commented Oct 2, 2024

This has been fixed within this PR.

If validation fails to prevent issues, the file upload input is now cleared adequately. I created another issue here to improve this behavior: #2161

2024-10-02 18-20-04

Customers notified ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants