Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>During import the ZODB has to remap the persistent ids in the dumped pickles, and to do so it has to 'load' all the entries in your export file.</p> <p>During that remapping process it thus will try and import every referenced class. Your export still holds references to <code>collective.formcriteria</code> classes, and that's why you get the error during import.</p> <p>There are two things you can do:</p> <ol> <li><p>Install <code>collective.formcriteria</code> into your buildout just for this import to work. There is no need to run install code or anything, the Zope process just needs to be able to import the class during the import process. You can remove it again afterwards.</p></li> <li><p>Fill in the missing imports with empty stubs. This is a bit more involved, as you'll need to create a dummy module that you'll insert into <code>sys.modules</code> to be loaded for this process.</p> <p>The dummy module could look like this; I've named it 'placeholder.py':</p> <pre><code>from persistent import Persistent class PlaceHolderClass(Peristent): def __repr__(self): return "&lt;Persistent placeholder class for now-removed instances&gt;" </code></pre> <p>And you stub out missing imports with:</p> <pre><code>import sys import placeholder sys.modules['collective.formcriteria.criteria.relativepath'] = placeholder placeholder.FormRelativePathCriterion = placeholder.PlaceHolderClass </code></pre> <p>It is quite likely you'll need to stub out more such classes, based on the <a href="https://svn.plone.org/svn/collective/collective.formcriteria/trunk/src/collective/formcriteria/" rel="nofollow"><code>collective.formcriteria</code> package layout</a>.</p> <p>Using this technique does not remove the broken references; it'll only let you import your <code>.zexp</code> file into a new instance.</p></li> </ol>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload