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
After the update to Plone 5.2 with Python3, we noticed a pickling error in the AddForms of some contenttypes. After further investigation, we noticed that all affected contenttypes have a behavior with a contacts-field which is a DataGridField with a RelationList (see the following code).
If we save the object with an empty contacts-field we don’t get the pickling error. If we fill in a value the following error gets thrown.
Traceback (innermost last):
Module ZPublisher.WSGIPublisher, line 156, in transaction_pubevents
Module ZPublisher.WSGIPublisher, line 338, in publish_module
Module ZPublisher.WSGIPublisher, line 256, in publish
Module ZPublisher.mapply, line 85, in mapply
Module ZPublisher.WSGIPublisher, line 62, in call_object
Module plone.z3cform.layout, line 63, in __call__
Module plone.z3cform.layout, line 47, in update
Module plone.dexterity.browser.add, line 141, 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 plone.dexterity.browser.add, line 116, in handleAdd
Module z3c.form.form, line 265, in createAndAdd
Module plone.dexterity.browser.add, line 91, in add
Module plone.dexterity.utils, line 189, in addContentToContainer
Module Products.BTreeFolder2.BTreeFolder2, line 464, in _setObject
Module zope.event, line 32, in notify
Module zope.component.event, line 27, in dispatch
Module zope.component._api, line 124, in subscribers
Module zope.interface.registry, line 442, in subscribers
Module zope.interface.adapter, line 607, in subscribers
Module zope.component.event, line 36, in objectEventNotify
Module zope.component._api, line 124, in subscribers
Module zope.interface.registry, line 442, in subscribers
Module zope.interface.adapter, line 607, in subscribers
Module plone.app.versioningbehavior.subscribers, line 109, in create_initial_version_after_adding
Module Products.CMFEditions.CopyModifyMergeRepositoryTool, line 336, in save
Module Products.CMFEditions.CopyModifyMergeRepositoryTool, line 500, in _recursiveSave
Module Products.CMFEditions.ArchivistTool, line 270, in prepare
Module Products.CMFEditions.ArchivistTool, line 224, in _cloneByPickle
TypeError: Can't pickle objects in acquisition wrappers.
Again we investigated further and found the referenced object in the contacts-field is not a RelationValue and also wrapped in Acquisition-Wrappers (as the error-message shows).
Shouldn’t the value be stored as RelationValue? If not: Why?
Does anybody know why we encounter the problem only when adding an object and not when editing it?
As a workaround, we are now hiding the field in all the AddForms.
NOTE: For the described field we have a custom Serializer, Deserializer, and RelatedItemsWidget. But our tests without these custom elements showed the same error.
The text was updated successfully, but these errors were encountered:
After the update to Plone 5.2 with Python3, we noticed a pickling error in the AddForms of some contenttypes. After further investigation, we noticed that all affected contenttypes have a behavior with a contacts-field which is a DataGridField with a RelationList (see the following code).
If we save the object with an empty contacts-field we don’t get the pickling error. If we fill in a value the following error gets thrown.
Again we investigated further and found the referenced object in the contacts-field is not a RelationValue and also wrapped in Acquisition-Wrappers (as the error-message shows).
Shouldn’t the value be stored as RelationValue? If not: Why?
Does anybody know why we encounter the problem only when adding an object and not when editing it?
As a workaround, we are now hiding the field in all the AddForms.
Relevant versions:
NOTE: For the described field we have a custom Serializer, Deserializer, and RelatedItemsWidget. But our tests without these custom elements showed the same error.
The text was updated successfully, but these errors were encountered: