On Wednesday 29 February 2012 07:31 PM, Tres Seaver wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 02/28/2012 09:56 PM, Suresh V. wrote:
ZODB Mountpoint distributed with Plone 4.1.2 always seems to create
OFS.Folder even if the container-class is specified.

Also getting a "KeyError: item already present wih same id" due to
_setObject and _setOb both being called.


Can you post the full traceback for that error?


In Products.ZODBMountPoint.MountedObject.py around line 373:

    # Add a faux object to avoid generating manage_afterAdd() events
    # while appeasing OFS.ObjectManager._setObject(), then discreetly
    # replace the faux object with a MountedObject.
    faux = Folder()
    faux.id = mo.id
    faux.meta_type = loaded.meta_type
    container._setObject(faux.id, faux)
    # DM 2005-05-17: we want to keep our decision about automatic
    #  mount point creation
    #del mo._create_mount_points
    container._setOb(faux.id, mo)
    setMountPoint(container, faux.id, mo)

The error was raised on the _setOb() line.

Removing the whole faux dance made everything work correctly. May be this is not necessary any more. Should I create a ticket?




Am trying to mount a plone.app.folder.folder.ATFolder from a separate
  Data.fs using instructions in:

http://plone.org/documentation/kb/mount-zeo-into-plonesite


Tres.
- --
===================================================================
Tres Seaver          +1 540-429-0999          tsea...@palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk9OL8AACgkQ+gerLs4ltQ6KXgCfUSmkU98w0QP3++tzXnmqdClr
0eMAn0XmTpASam2I2zD80b+IF9ONhoTk
=hNK7
-----END PGP SIGNATURE-----

_______________________________________________
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
  https://mail.zope.org/mailman/listinfo/zope-announce
  https://mail.zope.org/mailman/listinfo/zope )



_______________________________________________
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope )

Reply via email to