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

Uploads fail to validate in 0.5.0 #117

Closed
richardvanbergen opened this issue Mar 29, 2021 · 1 comment
Closed

Uploads fail to validate in 0.5.0 #117

richardvanbergen opened this issue Mar 29, 2021 · 1 comment

Comments

@richardvanbergen
Copy link

Bug Report

There's a regression in 0.5.0. I just tried it out in the demo app to confirm. When uploading an asset the user is not able to submit the form, instead getting a prompt to "Please correct errors.".

Expected Behavior

Form validation passes and upload continues.

Current Behavior

Toast popup: "Please correct errors."

Possible Solution

It's happening somewhere around here: https://github.com/payloadcms/payload/blob/master/src/admin/components/forms/Form/index.tsx#L71

It seems to be happening because it's expecting a filename to be present and have a value but at that time the file has not been uploaded so we only have access to a raw value property.

Steps to Reproduce

  1. Update to 0.5.0
  2. Spin up demo
  3. Try to upload something under Media

Detailed Description

Payload: 0.5.0

image

image

@jmikrut
Copy link
Member

jmikrut commented Mar 29, 2021

Thank you for the detective work here! This was actually due to a lower-level bug which we caught and fixed, but clearly surfaced through having required filename fields. On the frontend, the filename was never set, and is now being inappropriately validated. That base field should have been disabled in the admin UI entirely, and it now is!

Fixed in 23e1fc3.

@jmikrut jmikrut closed this as completed Mar 29, 2021
JessChowdhury added a commit that referenced this issue May 15, 2024
## Description

Closes [#117](payloadcms/payload-3.0-demo#177)
- hitting the space key while the `ReactSelect` is in focus crashes the
page.

This PR makes the following changes:
- Multivalue select component updated to only use `id`, drag feature
does not work when using `uuid()`
- Ensures relationship field (multi and single value) can be accessed
via the keyboard

- [X] I have read and understand the
[CONTRIBUTING.md](https://github.com/payloadcms/payload/blob/main/CONTRIBUTING.md)
document in this repository.

## Type of change

- [X] Bug fix (non-breaking change which fixes an issue)

## Checklist:

- [X] Existing test suite passes locally with my changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants