Re: Plone 4.2->4.3.4 PicklingError saving Dexterity content with relationship
dieter <[email protected]>
| Newsgroups | gmane.comp.web.zope.plone.user |
|---|---|
| Message-ID | <[email protected]> |
Simon Richardson <[email protected]> writes: > I've been doing some digging and I think the problem may be down to > the version of plone.directives.form in my existing 4.2 Plone site - > see: > > http://stackoverflow.com/questions/20290361/how-to-clean-up-old-interfaces-on-zc-relation-catalog > > If anyone can offer any further insight or suggest a correct path to > resolve my problem then I'd welcome your input. David Glick is (partially) wrong in his answer above: interfaces were explicitely designed to be picklable. Thus, the reason for your problem might be the move of the "Schema" class from "plone.form.schema" to "plone.supermodel.model" (suggested by "David Glick" in his answer above). Moving persistent classes across packages/modules unfortunately does not play well with the ZODB. It should be avoided. If it cannot be avoided, then some workarounds can be considered: * import the moved class at its old location from its new location (such that the class can be found both via the old as well via the new location) * if the old location has disappeared altogether, establishing a module alias ("sys.module[<missing>] = sys.module[<existing>]") may work around this * use a "monkey patch" (modification at startup time) to make the moved class available at its old location All these things are workarounds only -- they do not clean up the objects states in the ZODB. However, they might be a necessary prerequesite to a real cleanup (they ensure, that the affected objects become loadable): once an affected object ("o") is loaded from the ZODB and written again ("o._p_changed = True"; followed eventually be a "commit"), the object references the class at its new location. Unfortunately, it is difficult to locate all affected objects: there is no general approach. I cannot help you with finding the affected objects in your specific case. ------------------------------------------------------------------------------ New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet