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
When I add a field of certain types in the schema editor (either for a Dexterity content type, or an EasyForm form) and click settings, I get an alert that says "There was an error loading modal.". In the console, I get the following exception:
Traceback (innermost last):
Module ZPublisher.WSGIPublisher, line 162, in transaction_pubevents
Module ZPublisher.WSGIPublisher, line 371, in publish_module
Module ZPublisher.WSGIPublisher, line 274, 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 199, in _getForm
Module zope.component._api, line 102, in getMultiAdapter
Module zope.component._api, line 116, in queryMultiAdapter
Module zope.interface.registry, line 365, in queryMultiAdapter
Module zope.interface.adapter, line 844, in queryMultiAdapter
TypeError: object() takes no parameters
This is caused by the adapter AutoExtensibleSubformAdapter in module autoform. This adapter directly subclasses object, and doesn't define a custom __init__ method. Method _getForm in class z3c.form.object.ObjectWidget tries to create the adapter and the above exception gets thrown. This happens with fields of the following types:
Image
Rich Text
File Upload
I have tried updating collective.z3cform.datagridfield to version 2.0.1, but I still get the same exception.
As far as I can see, this adapter doesn't do anything and should never be created. When we remove the ZCML registration of this adapter, everything works correctly.
Maybe someone of you happen to have time to test this in the latest 3.x implementation for Plone 6 ... SubformAdapter got removed there and the DictRow schema can have plone.autoform hints ... no need for datagridUpdateWidgets anymore ...
I have the following packages installed:
Products.CMFPlone = 5.2.5
z3c.form = 3.7.1
collective.z3cform.datagridfield = 1.5.3
When I add a field of certain types in the schema editor (either for a Dexterity content type, or an EasyForm form) and click settings, I get an alert that says "There was an error loading modal.". In the console, I get the following exception:
This is caused by the adapter
AutoExtensibleSubformAdapter
in moduleautoform
. This adapter directly subclassesobject
, and doesn't define a custom__init__
method. Method_getForm
in classz3c.form.object.ObjectWidget
tries to create the adapter and the above exception gets thrown. This happens with fields of the following types:I have tried updating
collective.z3cform.datagridfield
to version 2.0.1, but I still get the same exception.As far as I can see, this adapter doesn't do anything and should never be created. When we remove the ZCML registration of this adapter, everything works correctly.
See also:
The text was updated successfully, but these errors were encountered: