Comment 8 for bug 143144

Revision history for this message
Jean Jordaan (jean-jordaan) wrote :

After some more trying out virtual mount points, it looks as if they are half baked and shouldn't be used.
For example, they don't work with getPhysicalPath and so break Plone's URLTool. I have this in my config:

mount-point /mnt_clme:/clme

During a ZEXP import I get a KeyError on 'clme'. This is what investigation shows:

(Pdb) url_tool
<URLTool at /clme/CLME/portal_url used for
/clme/CLME/online-forums/livestock-and-environmnet/794325627/794761425>
(Pdb) url_tool.getPortalPath()
'/clme/CLME'

(Pdb) start_path
'/clme/CLME/portal_skins'
(Pdb) context.restrictedTraverse(start_path + '/custom')
*** KeyError: 'clme'
(Pdb) context.restrictedTraverse('/mnt_clme/CLME/portal_skins' + '/custom')
<Folder at /clme/CLME/portal_skins/custom>

(Pdb) self.aq_parent.aq_parent.aq_parent.aq_parent.aq_parent.aq_parent.aq_parent.mnt_clme
<Folder at /clme>
(Pdb) self.aq_parent.aq_parent.aq_parent.aq_parent.aq_parent.aq_parent.aq_parent.mnt_clme.getPhysicalPath()
('', 'clme')

The same is reflected in the sort order of the mount points in the ZMI: sorting is according to 'clme' (the underlying object), not 'mnt_clme' (the mount name).

This is with Zope 2.9.8