Just discovered a missing "%" in Version.py. I found it in Zope 2.1.6, but it's still there in the current CVS. Here's a patch against 2.1.6; it should apply cleanly to the latest code. If not, I don't think you'll have a hard time replicating it manually. ;-) --- Version.py.orig Tue Aug 3 14:57:29 1999 +++ Version.py Wed Oct 18 08:50:33 2000 @@ -247,7 +247,7 @@ def manage_beforeDelete(self, item, container): if self.nonempty(): raise 'Version Error', ( - 'Attempt to %sdelete a non-empty version.<p>' + 'Attempt to %sdelete a non-empty version.<p>' % ((self is not item) and 'indirectly ' or '')) try: REQUEST=self.REQUEST Now if only I could figure out why Zope is trying to raise that exception on me... (I'm not deleting a version, I'm just renaming something within a version!) Greg -- Greg Ward - software developer gward@mems-exchange.org MEMS Exchange / CNRI voice: +1-703-262-5376 Reston, Virginia, USA fax: +1-703-262-5367
On 10/18/2000 9:04 AM, "Greg Ward" <gward@mems-exchange.org> wrote:
Now if only I could figure out why Zope is trying to raise that exception on me... (I'm not deleting a version, I'm just renaming something within a version!)
Greg
Because Rename deletes. The basic sequence of a renameObject command is (in short): In short, it: 1.Gets the object off of the objectmanager using the old id. 2.Deletes it from the objectmanager (doesn't delete the object itself!). 3.Changes the id of the object. 4.Adds it back to the objectmanager with the new id. The detailed version is: 1.Check ID (is the new id invalid or already used?), raise Invalid ID if so. 2.Get the object using _getOb 3.Check if object supports copying\moving using cb_isMoveable, raise CopyError 4.Use _verifyObjectPaste (Does some verification to make sure the user. 5.Try to notify recipient of the copy (in this case "self" - the ObjectManager or other CopySupport-subclassed class instance), if that fails, raise a Rename Error. 6.Delete the object off of the object manager (self._delObject) 7.If possible, get the aq_base of the object, then set the objects id to the new id. 8.Set the modified object on the ObjectManager, leaving the ownership info unchanged. (self._setObject). Jeffrey P Shell, jeffrey@Digicool.com http://www.digicool.com/ | http://www.zope.org
On 10/18/2000 9:27 AM, "Jeffrey P Shell" <jeffrey@digicool.com> wrote:
On 10/18/2000 9:04 AM, "Greg Ward" <gward@mems-exchange.org> wrote:
Now if only I could figure out why Zope is trying to raise that exception on me... (I'm not deleting a version, I'm just renaming something within a version!)
Greg
Because Rename deletes. The basic sequence of a renameObject command is (in short):
Actually, I'm not sure what you're asking here: are you renaming the Version object itself? Or renaming something else while inside the version? Jeffrey P Shell, jeffrey@Digicool.com http://www.digicool.com/ | http://www.zope.org
participants (2)
-
Greg Ward -
Jeffrey P Shell