[Zope] Re: HappySession

Hung Jung Lu hungjunglu@hotmail.com
Thu, 31 Aug 2000 19:03:17 PDT


My conjecture now is that your error-handling HTML might be accessing 
attributes from Zope server. A more correct way of handling exceptions 
should have been using the <dtml-try>...<dtml-except>...</dtml-try> block. 
But I kind of make a cheat sheet recipe recommendation, tweaking the 
standard_error_message, which was not a good idea. When Zope arrives to 
standard_error_message, the transaction has been aborted and if your 
session_not_found_html is not simple enough and uses more DTML features, I 
can see that it can cause transaction error.

Can you send me your session_not_found_html? I think this was the problem.

In the future I will remove the standard_error_message trick from the help 
file and instead tell people to use proper exception handling, which is the 
right way of doing things. But it will require people to structure their 
sites more carefully so they can catch the SessionNotFound exception. 
Basically, it is recommended that you have single (or few) index_html on 
your site, and place a <dtml-try>...<dtml-except ...>...</dtml-try> block to 
capture all exceptions from Zope and deal with them. It's the right way of 
doing things, it's just that many people tend to have many index_html and it 
will make their site harder to catch exceptions and deal with them in a 
centralized way.

In short, HappySession itself is probably not the cause of the transaction 
error. The problem probably comes from bad exception handling. If you want 
to use the standard_error_message trick, then please use a simple html page 
for session_not_found_html without additional Zope features. If I find out 
more, I'll let you know.

regards,

Hung Jung

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.