-
Notifications
You must be signed in to change notification settings - Fork 29
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
Missing validation message for userform upload field #177
Comments
Possibly related silverstripe/silverstripe-userforms#991 |
I tried to replicate this on kitchen-sink 4.x-dev I'm not able to select an svg, it seems a though my browser (firefox, chrome) blocks me from even selecting certains file types based on the 'accept' attribute. They are greyed on in the osx file manager that I use to select a file to upload. This is the same on watea, starter and simple If I manually remove the accept attribute I can submit anything to the server, the page reloads, and file extensions that are not allowed caused the form the re-render with no error message. No form submission is created in the backend either It seems as though the 'accept' attribute is doing enough to stop invalid files from being uploaded, so we don't really need to worry about error messages not being shown? |
It's not blocking me on Ubuntu with Firefox ... how dare you suggest that linux users on Firefox are a tiny portions of our user base! These are the most discerning of our users. If it's going to be a mission to solve this, than it might not be worth fixing. But since the message is showing up correctly in |
Maybe this PR Garion did will fix it on your local for starter and watea silverstripe/silverstripe-userforms#992 Try updating silverstripe-userforms to the latest 5.6.x-dev |
@maxime-rainville have you had a chance to retest this one with Garion's patch applied? |
Just tried running silverstripe/silverstripe-userforms#992 locally and it didn't seem to fix it. I also tried running on Edge in my Windows VM and managed to upload a bad file, so I don't think it's a Ubuntu only issue. The file I use to test was an SVG file with a different extension. The Mime validator will pick up that extension mismatched and fail the form. |
OK, so you are saying you need to update a file with the wrong extension to get this issue to show? If that's the case, I don't think it's worth fixing this since this is only a UX issue, not a security issue Can you replicate this issue using a normal file? |
It's any validation message that associated to the file upload field. If you upload a file that's too big, you'll probably get the same problem. |
Validation message on the userform upload fields do not show up on the front end.
Error when using the simple theme
Exact same form and error using Watea/Starter
The text was updated successfully, but these errors were encountered: