-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Monday 16 April 2001 20:47, Chris McDonough wrote:
Hi Uwe,
If possible, continue to cc the Zope list on this... thanks...
No problem.
You can explicitly cause a transaction to be committed, but not in DTML or in a Python Script. You'll need to use an external method...
Here's an example of an function which does this:
def commit_trans(): get_transaction().commit()
Make an external method named commit_trans, reference this function from within the external method UI, and then from dtml, you can do this:
<dtml-call commit_trans>
.... right before the raise. This should save the session data, then it won't matter if you raise afterwards in the DTML.
Ok, I did this - no effect. But I tried to use a normal dtml-method with the form on it and the same session related code. That works. So it isn't a general problem of my installation or the session management. It must have something to do with the login manager stuff. I'll dig into login manager and see how things work there. I think the guess about the raise might be quite good. When I remove the raise from the login manager method the method won't get called at all - instead the normal "basic auth" window appears. So my bet is that there is another raise with something like "auth required" inside the login manager methods. I'll check that. Probably only the placement of the commit is wrong. Thanks for your help
HTH,
- C
----- Original Message ----- From: "Uwe C. Schroeder" <Uwe.Schroeder@contrada.de> To: "Chris McDonough" <chrism@digicool.com> Sent: Monday, April 16, 2001 2:32 PM Subject: Re: CoreSessionTracking
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Monday 16 April 2001 20:22, you wrote:
Hi Uwe,
Thanks for the concise explanation of the problem... I'm cc'ing the Zope list on this... it's best to keep this stuff on the Zope list because the message archive helps other folks out (including me! ;-)
I think what's happening here is that the dtml-raise in the middle of the first snippet of DTML below aborts the ZODB transaction, and so the
session
data is never saved...
Is there a way to prompt for authorization without doing a DTML raise? I've never used LoginManager...
Hi,
wow - that's a quick answer. No I don't think that there's another way to do handle loginmanager. Loginmanager gets called on an authorization exception. The LoginForm isn't called directly, but gets called on any object a user tries to view without proper authentication. I don't know much about ZODB transactions, but probably you know if there's a way to finish the old transaction and start a new one ?
Thanks - I'll try to remove the raise.
Regards
Uwe C. Schröder
- -- Uwe C. Schröder ConTrada Consultants Lindenstrasse 15 Tel/Fax: +49 8294 80070 D-86477 Adelsried Mobil: +49 172 8532352 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (GNU/Linux) Comment: For info see http://www.gnupg.org
iD8DBQE62zrRTJbO78VG0aIRAhVvAKCq1jMYJgKai9x4qBLCKS1y8rAigACffDfG IqFwZQA8KO4a6d5++Qpik/o= =IV1E -----END PGP SIGNATURE-----
- -- Uwe C. Schröder - -- Uwe C. Schröder ConTrada Consultants Lindenstrasse 15 Tel/Fax: +49 8294 80070 D-86477 Adelsried Mobil: +49 172 8532352 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE624xuTJbO78VG0aIRAkffAKCcq1vvEhFDBEYGJzUtRCiwr86CKACgkd/u Sg+6FrhZRZjT8UVUo+LN5zc= =+pAI -----END PGP SIGNATURE-----