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

Dexterity should not allow the creation of multiple fields with the same short name #260

Open
haritomedia opened this issue Oct 16, 2017 · 1 comment

Comments

@haritomedia
Copy link

When creating a dexterity type, it's possible to add multiple fields with the same short name.
I added a field called title (and there is already the default (required) Dublin Core title field.
This resulted in the creation of broken content items: I filled in a value for the first title field, and left the second field blank. The submitted form is valid because the required field has a value, but the created item was broken because the value set on the item was taken from the second (blank) title field.

Dexterity should not allow the creation of multiple fields with the same short name, as the last field value wins.

@jensens
Copy link
Member

jensens commented Oct 17, 2017

Well. In fact, the problem is the default attribute storage cannot deal with it, not that different behaviors may contain the same field. When using behaviors with adapters that are aware of the fact a name for a thing in a storage can collide, then this would not be a problem. For pure adapter-less (or in fact not adapter-less, it assumes the adapter-is-the-context) behaviors there is no good way to check. I think it is more a documentation thing: Use prefixes.

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

2 participants