Transparent Folders cause import fail
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. Didier Georgieff. Traceback (innermost last): File /Zope216/lib/python/ZPublisher/Publish.py, line 214, in publish_module File /Zope216/lib/python/ZPublisher/Publish.py, line 179, in publish File /Zope216/lib/python/Zope/__init__.py, line 202, in zpublisher_exception_hook (Object: ApplicationDefaultPermissions) File /Zope216/lib/python/ZPublisher/Publish.py, line 165, in publish File /Zope216/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: manage_importObject) File /Zope216/lib/python/ZPublisher/Publish.py, line 102, in call_object (Object: manage_importObject) File /Zope216/lib/python/OFS/ObjectManager.py, line 488, in manage_importObject (Object: ApplicationDefaultPermissions) File /Zope216/lib/python/OFS/ObjectManager.py, line 231, in _setObject (Object: ApplicationDefaultPermissions) File /Zope216/lib/python/Products/TransparentFolders/TransparentFolder Patch.py, line 138, in _checkId (Object: ApplicationDefaultPermissions) File /Zope216/lib/python/OFS/ObjectManager.py, line 199, in _checkId (Object: ApplicationDefaultPermissions) Bad Request: (see above)
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
participants (2)
-
Didier Georgieff -
Shane Hathaway