collective / collective.easyform

Forms for Plone

Home Page:https://pypi.org/project/collective.easyform

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RelationChoice and RadioWidget crashes field editor

Nimo-19 opened this issue · comments

commented

Yesterday a person on our plone instance created a EasyForm form with a RelationChoice field and set the widget to RadioFieldWidget (I think this was unintentional).
This crashed the form. And even the WYSIWYG fields editor. The page only showed the following error.
After a few tries I got to the xml editor and could remove the widget.
But it is a poor experience for a normal editor to get be blocked by this error while trying to get to the field editor.

ComponentLookupError: ((<EasyForm at [form]/>, <WSGIRequest, URL=https://[form]/view>, <plone.z3cform.fieldsets.group.Group object at 0x7fb409f6d400>, <z3c.relationfield.schema.RelationChoice object at 0x7fb40a28fb00 plone.supermodel.generated..[field-id]>, <RadioWidget 'form.widgets.[field-id]'>), <InterfaceClass z3c.form.interfaces.ITerms>, '')
  File "ZPublisher/WSGIPublisher.py", line 162, in transaction_pubevents
    yield
  File "ZPublisher/WSGIPublisher.py", line 371, in publish_module
    response = _publish(request, new_mod_info)
  File "ZPublisher/WSGIPublisher.py", line 274, in publish
    bind=1)
  File "ZPublisher/mapply.py", line 85, in mapply
    return debug(object, args, context)
  File "ZPublisher/WSGIPublisher.py", line 63, in call_object
    return obj(*args)
  File "opt/plone/buildout-cache/eggs/plone.z3cform-1.1.3-py3.7.egg/plone/z3cform/layout.py", line 63, in __call__
    self.update()
  File "opt/plone/buildout-cache/eggs/plone.z3cform-1.1.3-py3.7.egg/plone/z3cform/layout.py", line 47, in update
    self.form_instance.update()
  File "opt/plone/buildout-cache/eggs/collective.easyform-3.1.1-py3.7.egg/collective/easyform/browser/view.py", line 302, in update
    super(EasyFormForm, self).update()
  File "opt/plone/buildout-cache/eggs/plone.z3cform-1.1.3-py3.7.egg/plone/z3cform/fieldsets/extensible.py", line 65, in update
    super(ExtensibleForm, self).update()
  File "opt/plone/buildout-cache/eggs/plone.z3cform-1.1.3-py3.7.egg/plone/z3cform/patch.py", line 30, in GroupForm_update
    _original_GroupForm_update(self)
  File "opt/plone/buildout-cache/eggs/z3c.form-3.7.1-py3.7.egg/z3c/form/group.py", line 141, in update
    group.update()
  File "opt/plone/buildout-cache/eggs/z3c.form-3.7.1-py3.7.egg/z3c/form/group.py", line 52, in update
    self.updateWidgets()
  File "opt/plone/buildout-cache/eggs/z3c.form-3.7.1-py3.7.egg/z3c/form/group.py", line 48, in updateWidgets
    self.widgets.update()
  File "opt/plone/buildout-cache/eggs/z3c.form-3.7.1-py3.7.egg/z3c/form/field.py", line 277, in update
    widget.update()
  File "opt/plone/buildout-cache/eggs/z3c.form-3.7.1-py3.7.egg/z3c/form/browser/radio.py", line 79, in update
    super(RadioWidget, self).update()
  File "opt/plone/buildout-cache/eggs/z3c.form-3.7.1-py3.7.egg/z3c/form/browser/widget.py", line 171, in update
    super(HTMLFormElement, self).update()
  File "opt/plone/buildout-cache/eggs/z3c.form-3.7.1-py3.7.egg/z3c/form/widget.py", line 233, in update
    self.updateTerms()
  File "opt/plone/buildout-cache/eggs/z3c.form-3.7.1-py3.7.egg/z3c/form/widget.py", line 227, in updateTerms
    interfaces.ITerms)
  File "opt/plone/buildout-cache/eggs/zope.component-4.6.2-py3.7.egg/zope/component/_api.py", line 104, in getMultiAdapter
    raise ComponentLookupError(objects, interface, name)