ValueError: ('Duplicate name', 'my.behavior')
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3
- Forks
- 3
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 3
Description
created a package and registered a behavior "my.behavior".
works fine so far.
create another package (my.behavior.sub) and override the behavior.
(just needed to change languageindepent on one field of the behavior)
fire up zope: all is fine.
create a plone site and install additionally the my.behavior.sub
still - all is fine
but now go to control panel -> dexterity types -> choose a type and click on the "behaviors" tab:
ERROR Zope.SiteErrorLog 1489568742.040.915683235822 http://localhost:8050/Plone/dexterity-types/News%20Item/@@behaviors
Traceback (innermost last):
Module ZPublisher.Publish, line 138, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 48, in call_object
Module plone.z3cform.layout, line 63, in __call__
Module plone.z3cform.layout, line 47, in update
Module z3c.form.form, line 226, in update
Module plone.z3cform.patch, line 20, in BaseForm_update
Module z3c.form.form, line 154, in update
Module z3c.form.form, line 136, in updateWidgets
Module z3c.form.field, line 227, in update
Module plone.app.dexterity.browser.behaviors, line 115, in fields
Module z3c.form.field, line 136, in __init__
ValueError: ('Duplicate name', 'my.behavior')
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure in the Dexterity type behaviors tab using the two packages and inspect plone.app.dexterity.browser.behaviors and the z3c.form.field call shown in the traceback. Determine how the overridden behavior is represented during field construction; done means the tab loads without a duplicate-name ValueError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100