Skip to content

Conversation

@Shyam-Raghuwanshi
Copy link

@Shyam-Raghuwanshi Shyam-Raghuwanshi commented Dec 17, 2025

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

  • I signed and returned the Plone Contributor Agreement, and received and accepted an invitation to join a team in the Plone GitHub organization.
  • I verified there aren't any other open pull requests for the same change.
  • I followed the guidelines in Contributing to Plone.
  • I successfully ran code quality checks on my changes locally.
  • I successfully ran tests on my changes locally.
  • If needed, I added new tests for my changes.
  • If needed, I added documentation for my changes.
  • I included a change log entry in my commits.

📚 Documentation preview 📚: https://plonerestapi--1969.org.readthedocs.build/

@mister-roboto
Copy link

@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:

@jenkins-plone-org please run jobs

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!

Copy link
Member

@davisagli davisagli left a 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.

@Shyam-Raghuwanshi
Copy link
Author

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.

@davisagli
Copy link
Member

@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.

@Shyam-Raghuwanshi
Copy link
Author

@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

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

Successfully merging this pull request may close these issues.

3 participants