collective / collective.exportimport

Export and import content and other data from and to Plone
GNU General Public License v2.0
15 stars 15 forks source link

Can't export content with versions in Plone 5.0 #193

Open JeffersonBledsoe opened 1 year ago

JeffersonBledsoe commented 1 year ago

Trying to export with revisions in Plone5.0 results in the following exception:

Traceback (most recent call last):
  File "/buildout/plone/instance/buildout-cache/eggs/collective.exportimport-1.7.dev0+155870989426123572981149019563996627444-py2.7.egg/collective/exportimport/export_content.py", line 303, in export_content
    item = self.update_export_data(item, obj)
  File "/buildout/plone/instance/buildout-cache/eggs/collective.exportimport-1.7.dev0+155870989426123572981149019563996627444-py2.7.egg/collective/exportimport/export_content.py", line 347, in update_export_data
    item = self.export_revisions(item, obj)
  File "/buildout/plone/instance/buildout-cache/eggs/collective.exportimport-1.7.dev0+155870989426123572981149019563996627444-py2.7.egg/collective/exportimport/export_content.py", line 503, in export_revisions
    item_version = serializer(include_items=False, version=version_id)
TypeError: __call__() got an unexpected keyword argument 'version'

This occurs here: https://github.com/collective/collective.exportimport/blob/a810deb55721870af6c1d10e71fe2b1e551d1caa/src/collective/exportimport/export_content.py#L510

mauritsvanrees commented 1 year ago

That version seems to be supported since plone.restapi 1.0.0 already, but maybe not in all possible serialisers. Can you check what serializer is here? What portal_type is the item/object for? Maybe its serializer cannot handle this.