You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Screenshot shows the schemaeditor for xmldirector.connector with a custom behavior adding some fields through the "guideline" fielset. Trying to add a custom field to the field throws an error.
Traceback (innermost last):
Module ZPublisher.WSGIPublisher, line 142, in transaction_pubevents
Module ZPublisher.WSGIPublisher, line 295, in publish_module
Module ZPublisher.WSGIPublisher, line 229, in publish
Module ZPublisher.mapply, line 85, in mapply
Module ZPublisher.WSGIPublisher, line 57, in call_object
Module plone.z3cform.layout, line 63, in __call__
Module plone.z3cform.layout, line 47, in update
Module plone.z3cform.fieldsets.extensible, line 65, in update
Module plone.z3cform.patch, line 30, in GroupForm_update
Module z3c.form.group, line 145, in update
Module plone.app.z3cform.csrf, line 22, in execute
Module z3c.form.action, line 98, in execute
Module z3c.form.button, line 315, in __call__
Module z3c.form.button, line 170, in __call__
Module z3c.form.form, line 257, in handleAdd
Module z3c.form.form, line 265, in createAndAdd
Module plone.schemaeditor.browser.schema.add_field, line 83, in add
Module plone.schemaeditor.utils, line 52, in get_fieldset_from_index
IndexError: list index out of range
> /home/ajung/sandboxes/onkopedia_buildout-plone5/eggs/plone.schemaeditor-2.0.20-py3.7.egg/plone/schemaeditor/utils.py(50)get_fieldset_from_index()
-> index = int(index or 0) - 1
(Pdb) args
schema = <SchemaClass xmldirector.connector.connector.IConnector>
index = 6
(Pdb) n
> /home/ajung/sandboxes/onkopedia_buildout-plone5/eggs/plone.schemaeditor-2.0.20-py3.7.egg/plone/schemaeditor/utils.py(51)get_fieldset_from_index()
-> fieldsets = schema.queryTaggedValue(FIELDSETS_KEY, [])
(Pdb)
> /home/ajung/sandboxes/onkopedia_buildout-plone5/eggs/plone.schemaeditor-2.0.20-py3.7.egg/plone/schemaeditor/utils.py(52)get_fieldset_from_index()
-> return fieldsets[index] if index >= 0 else None
(Pdb) pp fieldset
*** NameError: name 'fieldset' is not defined
(Pdb) pp fieldsets
[]
The text was updated successfully, but these errors were encountered:
I have commited a fix for this in #92 and plone/mockup#1203 which prevents fields to be added into fieldsets from behaviors, since I don't think this was ever intended.
Plone 5.2, plone.schemaeditor 2.0.20.
Screenshot shows the schemaeditor for
xmldirector.connector
with a custom behavior adding some fields through the "guideline" fielset. Trying to add a custom field to the field throws an error.The text was updated successfully, but these errors were encountered: