Run a plone zexp imported into a fresh Data.fs

published Feb 09, 2010 11:43   by admin ( last modified Feb 09, 2010 11:43 )

Summary: You can't. The server will give an error. The trick is to create a bogus site in the new Zope server. This somehow modifies Zope, from what I have read on the Internet, the acl_users folder in the Zope root.

One of my hobby projects was not on our backup bandwagon, so when I accidentally corrupted Data.fs by overwriting it (the tar command is very picky it turns out about not mixing up source and destination file names) I was out of remedies. But luckily enough I had made a "site.zexp" a few days ago by exporting the site from within the Zope ZMI.

So, just delete the old Data.fs completely, start up the server and import the zexp. That works, but you cannot view any pages, you get AttributeError: getGroups . Googling I found a posting by Andreas Jung. Jung doesn't explicitly say it but writes:

Problem solved. The behavior is caused by the stupid expectation of Plone
that the root acl_users folder having been replaced with its own
implementation while creating a new site

...and from there it was possible to deduce that creating a new bogus site from within the ZMI should do the trick. And this can be done after the import.