collective / collective.easyform

Forms for Plone
https://pypi.org/project/collective.easyform
13 stars 29 forks source link

Settings image field: TypeError: AutoExtensibleSubformAdapter() takes no arguments #257

Open phewera opened 3 years ago

phewera commented 3 years ago

I have an image field in my easyform and when i try to open the settings modal i am getting the following error:

Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 162, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 359, in publish_module
  Module ZPublisher.WSGIPublisher, line 254, in publish
  Module ZPublisher.mapply, line 85, in mapply
  Module ZPublisher.WSGIPublisher, line 63, 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 132, in update
  Module z3c.form.form, line 136, in updateWidgets
  Module z3c.form.field, line 277, in update
  Module z3c.form.browser.widget, line 171, in update
  Module z3c.form.object, line 216, in update
  Module Products.CMFPlone.patches.z3c_form, line 47, in _wrapped
  Module z3c.form.widget, line 132, in update
  Module z3c.form.object, line 273, in value
  Module z3c.form.object, line 203, in updateWidgets
  Module z3c.form.object, line 196, in _getForm
  Module zope.component._api, line 102, in getMultiAdapter
  Module zope.component._api, line 116, in queryMultiAdapter
  Module zope.interface.registry, line 364, in queryMultiAdapter
  Module zope.interface.adapter, line 564, in queryMultiAdapter
TypeError: AutoExtensibleSubformAdapter() takes no arguments

This seems similar to this issue: https://github.com/plone/Products.CMFPlone/issues/3050 I already took a look at the traceback but could not figure out what is causing the problem.

Plone 5.2.2 with collective.easyform 3.0.5

thomasmassmann commented 3 years ago

I was bitten by the same error today, the error message I got was just object() takes no arguments.

This comes from the datagrid field adapter for subforms. I don't know why this is registered and what it is used for. I deactivated it and datagridfield still works for me, and the error is gone (@jensens you added parts of it, can you explain this?):

<configure
    xmlns="http://namespaces.zope.org/zope"
    xmlns:zcml="http://namespaces.zope.org/zcml"
    i18n_domain="my.addon">

  <include package="z3c.unconfigure" file="meta.zcml" />

  <unconfigure zcml:condition="installed collective.z3cform.datagridfield">
    <adapter factory="collective.z3cform.datagridfield.autoform.AutoExtensibleSubformAdapter" />
  </unconfigure>
</configure>
vanne commented 3 years ago

Same problem here, with Rich Text Field settings.

Plone 5.2.3 Easyform 3.0.5 Data grid field 1.5..3