37 messages in net.sourceforge.lists.plone-developersRe: CMFFormController should abort th...
FromSent OnAttachments
Dorneles TreméaNov 9, 2007 3:17 pm 
Philipp von WeitershausenNov 10, 2007 7:07 am 
Dorneles TreméaNov 10, 2007 7:58 am 
Wichert AkkermanNov 10, 2007 12:22 pm 
Martin AspeliNov 10, 2007 2:12 pm 
Wichert AkkermanNov 10, 2007 4:20 pm 
Philipp von WeitershausenNov 11, 2007 1:32 am 
Dorneles TreméaNov 11, 2007 5:19 pm 
Alan RunyanNov 11, 2007 5:20 pm 
Martin AspeliNov 11, 2007 5:44 pm 
Martin AspeliNov 11, 2007 5:51 pm 
Wichert AkkermanNov 12, 2007 4:37 am 
Sidnei da SilvaNov 12, 2007 4:43 am 
Daniel KraftNov 12, 2007 5:40 am 
Martin AspeliNov 12, 2007 5:52 am 
Dorneles TreméaNov 12, 2007 9:35 am 
Wichert AkkermanNov 12, 2007 9:56 am 
Martin AspeliNov 12, 2007 9:59 am 
Martin AspeliNov 12, 2007 10:00 am 
Dorneles TreméaNov 12, 2007 10:56 am 
Martin AspeliNov 12, 2007 11:14 am 
Martin AspeliNov 12, 2007 11:21 am 
Wichert AkkermanNov 12, 2007 11:36 am 
Martin AspeliNov 12, 2007 11:41 am 
Sidnei da SilvaNov 12, 2007 11:47 am 
Martin AspeliNov 12, 2007 12:04 pm 
Dorneles TreméaNov 12, 2007 12:28 pm 
Dorneles TreméaNov 12, 2007 12:34 pm 
Dorneles TreméaNov 12, 2007 1:29 pm 
Wichert AkkermanNov 12, 2007 1:32 pm 
Martin AspeliNov 12, 2007 1:41 pm 
Dorneles TreméaNov 12, 2007 1:44 pm 
Martin AspeliNov 12, 2007 1:46 pm 
Wichert AkkermanNov 12, 2007 1:46 pm 
Martin AspeliNov 12, 2007 1:47 pm 
Dorneles TreméaNov 12, 2007 5:11 pm 
Daniel NouriNov 13, 2007 4:14 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: CMFFormController should abort the current transaction when the validation failsActions...
From:Philipp von Weitershausen (phil@public.gmane.org)
Date:Nov 11, 2007 1:32:27 am
List:net.sourceforge.lists.plone-developers

Dorneles Treméa wrote:

Hey Philipp,

I'm going to commit that fix in no one objects until Monday... :-)

I do :).

transaction.abort() somewhere during the life-time of a request is potentially harmful because it implicitly creates a new transaction. That way, other code that's executed *after* transaction.abort() but *before* the ZPublisher does a transaction.commit() will therefore be committed. But you'd really want to forget the whole request.

I suggest using transaction.doom() instead. Note that this may likely require changes to the ZPublisher because it will have to check for doomed transactions and then either abort or commit.

I could not find any reference to 'doom' in the 'transaction' module from Zope 2.x... :-/

I suspect that it was introduced on Zope 3, and that we still have to live with 'abort' for now.

transaction.doom() was only introduced in ZODB 3.8. So I suppose this'll have to wait for when your code requires Zope 2.11. I suggest adding a TODO comment about it, though.