[Zope] Zope Versions unusable?

Michel Pelletier michel@digicool.com
Mon, 20 Dec 1999 10:03:09 -0500


> -----Original Message-----
> From: Jochen Haeberle [mailto:listen@MIDRAS.de]
> Sent: Sunday, December 19, 1999 11:57 AM
> To: Zope-Talk
> Subject: [Zope] Zope Versions unusable?
> 
> 
> Hi,
> 
> I had to discard a version I was working on in Zope 2.1 twice already 
> because in the normal view there happened a "VersionLockError":
> 
> Error Type: VersionLockError
> Error Value: ("'\\000\\000\\000\\000\\000\\000\\005\\341'", 
> 'ArtikelVersion')
> 
> Is this something known to you? Is this a bug? Does anyone know when 
> this can happen?

A VersionLockError means that you are trying to modify an object that is
locked in a version.  If you change an object in a version, and then try
and change that object out of a a version (or in a different version)
you will get this error.  Only one version at at time can modify an
object.

> Are there things to avoid when working in a version?

Oh yes.  Cataloging does not work well in a version.  If you enter a
version, and then start playing with objects that catalog themselves,
then the catalog object itself can get locked in a version, locking out
any other objects from indexing themselves with this exact same error.

> If this happens rather often and unknown to the content manager, I 
> guess the Versions of Zope are rather unusable, because they do not 
> protect your working securly!

Your version and database should still be intact, it just didn't let you
make the change you tried to make on the locked object.  Zope puts a
little lock icon next to objects that are locked in a version.  The
workaround for this is to commit or abort your versions before modifying
locked objects.

-Michel