Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PicklingError after migrating from Plone 4.2 to Plone 4.3 #25

Open
hvelarde opened this issue May 12, 2015 · 9 comments
Open

PicklingError after migrating from Plone 4.2 to Plone 4.3 #25

hvelarde opened this issue May 12, 2015 · 9 comments
Labels

Comments

@hvelarde
Copy link
Member

A site running under Plone 4.2 and using collective.syndication was recently migrated to Plone 4.3.

Before migrating it, collective.syndication was uninstalled as all is code base is only a backport of the Plone 4.3 syndication feature.

Everything looked fine after we tried to edit an content type instance with some related items, then the following error showed up:

2015-04-22T16:12:05 ERROR Zope.SiteErrorLog 1429729925.20.196064521565 http://localhost:8481/Plone/economia/outro-teste-2852.html/@@edit
Traceback (innermost last):
  Module ZPublisher.Publish, line 146, in publish
  Module Zope2.App.startup, line 301, in commit
  Module transaction._manager, line 89, in commit
  Module transaction._transaction, line 329, in commit
  Module transaction._transaction, line 443, in _commitResources
  Module ZODB.Connection, line 567, in commit
  Module ZODB.Connection, line 623, in _commit
  Module ZODB.Connection, line 658, in _store_objects
  Module ZODB.serialize, line 422, in serialize
  Module ZODB.serialize, line 431, in _dump
PicklingError: Can't pickle <class 'collective.syndication.interfaces.ISyndicatable'>: import of module collective.syndication.interfaces failed

My workaround was based on what was discussed in this issue: http://stackoverflow.com/q/29787760/644075

So I ended up listing the package in the eggs part but, because collective.syndication cannot be installed on a site with Plone 4.3, I had to modify the egg information, which is nasty.

This seems indeed related with this other issue: http://stackoverflow.com/q/20290361/644075

@hvelarde hvelarde added the bug label May 12, 2015
@hvelarde
Copy link
Member Author

@vangheem what do you think? how can we avoid this on the future?

@vangheem
Copy link
Member

recommend uninstalling before you upgrade to 4.2. uninstall should clean the database.

@hvelarde
Copy link
Member Author

@vangheem that's what I did: I uninstalled before upgrading to 4.3

@vangheem
Copy link
Member

Is there an uninstall step that actually cleans the database? I didn't write any of collective.syndication.

@vangheem
Copy link
Member

Could we add an alias_module to plone.app.upgrade for collective.syndication?

https://github.com/plone/plone.app.upgrade/blob/master/plone/app/upgrade/__init__.py

There should be a recipe to configure these through buildout or something.

@hvelarde
Copy link
Member Author

@vangheem you're speaking like in another language to me :-)

@tcurvelo do you want to help on this? BTW, was your pull request finally merged?

@vangheem
Copy link
Member

@vangheem
Copy link
Member

vangheem commented Sep 8, 2015

@hvelarde
Copy link
Member Author

hvelarde commented Jun 28, 2016

just to document the workaround for this issue, the following code must be added to a policy package or similar:

# BBB: avoid PicklingError in Plone 4.3
import sys
from Products.CMFPlone.interfaces import syndication
sys.modules['collective.syndication.interfaces'] = sys.modules[syndication.__name__]

@ebrehault @jensens @thet @frapell @tisto @bloodbare can we add this fix to Plone 4.3 as @vangheem suggested?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants