-
-
Notifications
You must be signed in to change notification settings - Fork 98
fixing missing parameter factory error #1969
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
base: main
Are you sure you want to change the base?
Conversation
|
@Shyam-Raghuwanshi thanks for creating this Pull Request and helping to improve Plone! TL;DR: Finish pushing changes, pass all other checks, then paste a comment: To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically. Happy hacking! |
davisagli
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not the right way to fix this. If the client requests a field factory that doesn't exist, it's the job of the API to throw an error, not magically turn it into something else.
Hi, you’re absolutely right. I wanted to clarify one point and get your thoughts on it. The client has requested adding a field that already exists on the frontend. For example, if we take the Full Name field: if we remove it from the frontend, then there’s nothing additional we need to handle here. However, if the Full Name field is selected and we send a value for a field that doesn’t exist, it may result in an error, which could be confusing from a user perspective. I wanted to check with you whether this understanding is correct and how you’d recommend handling this case. |
|
@Shyam-Raghuwanshi It's a bug that Full Name is shown as a choice in the frontend here. It's meant for when the SchemaWidget is used to set up a volto-form-block form, but not when it is used to set up a content type schema. I asked @robgietema to take a look at it. |
ok, we will proceed with this after the reply |
How to reproduce
go to - https://demo.plone.org/controlpanel/dexterity-types/Document/schema
Try adding any new field using - Add field
And fill required field for text or full name
Try to save
📚 Documentation preview 📚: https://plonerestapi--1969.org.readthedocs.build/