Hi,
This is my first post here, so apologies if I miss anything.
We have an error on our Plone 5.2.4 site with certain File objects when users try to add a new version, we get the following error,
Module ZPublisher.WSGIPublisher, line 162, in transaction_pubevents
Module ZPublisher.WSGIPublisher, line 371, in publish_module
Module ZPublisher.WSGIPublisher, line 266, 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.dexterity.browser.edit, line 58, 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.edit, line 30, in handleApply
Module z3c.form.group, line 124, in applyChanges
Module zope.event, line 32, in notify
Module zope.component.event, line 27, in dispatch
Module zope.component._api, line 134, in subscribers
Module zope.interface.registry, line 448, in subscribers
Module zope.interface.adapter, line 619, in subscribers
Module zope.component.event, line 36, in objectEventNotify
Module zope.component._api, line 134, in subscribers
Module zope.interface.registry, line 448, in subscribers
Module zope.interface.adapter, line 619, in subscribers
Module plone.app.versioningbehavior.subscribers, line 62, in create_version_on_save
Module Products.CMFEditions.CopyModifyMergeRepositoryTool, line 332, in save
Module Products.CMFEditions.CopyModifyMergeRepositoryTool, line 500, in _recursiveSave
Module Products.CMFEditions.ArchivistTool, line 267, in prepare
Module Products.CMFEditions.ModifierRegistryTool, line 135, in getReferencedAttributes
Module plone.app.versioningbehavior.modifiers, line 117, in getReferencedAttributes
Module Products.CMFEditions.CopyModifyMergeRepositoryTool, line 410, in retrieve
Module Products.CMFEditions.CopyModifyMergeRepositoryTool, line 558, in _retrieve
Module Products.CMFEditions.CopyModifyMergeRepositoryTool, line 634, in _recursiveRetrieve
Module Products.CMFEditions.ArchivistTool, line 342, in retrieve
Module Products.CMFEditions.ArchivistTool, line 510, in __getitem__
Module Products.CMFEditions.ModifierRegistryTool, line 162, in reattachReferencedAttributes
Module plone.app.versioningbehavior.modifiers, line 188, in reattachReferencedAttributes
TypeError: ('Could not adapt', <File at template-service-agreement>, <InterfaceClass plone.dexterity.schema.generated.eidc_0_File>)```
This only seems to happen when versioning is enabled for File types and even then only for certain files, new files are fine for example.
All of the files involved appear to have a version Id of 0, I'm not sure if that is relevant to this, but thought I'd mention it. The files that do work have a plone.dexterity.schema.generated without _0_, usually a longer more random ID. Could this be something to do with it?
Any help would be much appreciated!
Thanks,
Mike.