[Zope] Transparent Folders cause import fail
Shane Hathaway
shathaway@earthling.net
Thu, 11 May 2000 12:43:13 -0400
Didier Georgieff wrote:
>
> Hello,
>
> i'm switching from 2.1.6 on NT to 2.1.6 on Linux (and have added
> the "transparent folder" on the new machine).
> And i was trying to import existing documents via xml
> It failed with messages below.
>
> I ended up trying to import a single image object without success.
> Same error.
>
> When i deleted the TF product it was back to normal and import
> was working fine.
> Checked again with the TF product installed and failed again.
>
> Any idea on what's going on ?
> Thanks in advance.
The TransparentFolders product patches ObjectManager so that objects in
transparent folders are searched. Unfortunately, the patch causes the
pickling mechanism to fail when ZODB pickles a class definition derived
from ObjectManager. (Note the difference between class definitions and
class instances; instances are all over a Zope site while definitions
are usually only under the Products folder.) The reason it fails is
because the pickler doesn't recognize the new __getattr__ method as a
Python Method and tries to pickle it, which is not possible. There is
actually a way to solve that bug by patching more Zope source, but I
don't think that's the right solution.
The better solution will involve the same method SiteAccess uses to
change traversal behavior. There's some stirring going on here at DC
about Evan's SiteAccess and how it ought to work. Once SiteAccess has
settled, it should be easy to create a much improved
TransparentFolders. But for now, I have removed TransparentFolders
from the available products.
Shane