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.
Well, this problem just accours when I restart the server or I stay too much time idle and the session expires... The frame[0] (the first to be loaded) show a session not found message and in frame[1] I got this error: Error Type: KeyError Error Value: NDxCfgEr_89YtG So, if I refesh the page zope show me the transaction error and everything stops working.... I need to restart zope and my netscape (to clean all cookies) to get things working again.... Here's my session not found page but this error occours when I doesnt have one too... well, in the standard html header I call call a method that do a call in all my sessions.... I have two SESSION objects, one in the root of zope and other in the opt folder of zope.... look how I call the SESSIONS.... in standard_html_header <dtml-call callSession> The callSession method: <dtml-call SESSION> <dtml-call opt.SESSION> session_not_found_html: <dtml-var standard_html_header> <font face=Arial size=2> O tempo máximo de duração foi ultrapassado.<br> Os items existentes no seu carrinho foram apagados.<br><br> Continue suas compras normalmente agora... </font> <dtml-var standard_html_footer> On Thu, 31 Aug 2000, you wrote:
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. --
Diego Rodrigo Neufert -webmaster --------------------------- (Magic Web Design) (email) (diego@magicwebdesign.com.br) (curitiba) (pr)
I also use HappySession and when catching the SessionNotFoundError weird things happen: here my code: <dtml-try> <dtml-call "SESSION.set('FLinkID','0')"> <dtml-except> session error! </dtml-try> When the session is expired the error is not caught correctly and I get the error mentioned below. Plus, I have to restart my server because ZODB reports a transactional error and sets itself to read-only. thanks Philipp Auersperg (zwork) ----------------------------------- Zope Error Zope has encountered an error while publishing this resource. Error Type: KeyError Error Value: SessionUID ----------------------------------- and the traceback: Traceback (innermost last): File /usr/local/Zope-2.1.4-linux2-x86/lib/python/ZPublisher/Publish.py, line 214, in publish_module File /usr/local/Zope-2.1.4-linux2-x86/lib/python/ZPublisher/Publish.py, line 179, in publish File /usr/local/Zope-2.1.4-linux2-x86/lib/python/Zope/__init__.py, line 202, in zpublisher_exception_hook (Object: ElementWithAttributes) File /usr/local/Zope-2.1.4-linux2-x86/lib/python/ZPublisher/Publish.py, line 169, in publish File /usr/local/Zope-2.1.4-linux2-x86/lib/python/ZODB/Transaction.py, line 275, in commit File /usr/local/Zope-2.1.4-linux2-x86/lib/python/Shared/DC/ZRDB/TM.py, line 120, in tpc_finish (Object: TM) File /usr/local/Zope-2.1.4-linux2-x86/lib/python/Products/HappySession/HappySession.py, line 168, in _finish (Object: TM) File /usr/local/Zope-2.1.4-linux2-x86/lib/python/Products/HappySession/HappySession.py, line 291, in _onTransactionEnded (Object: SESSION) File /usr/local/Zope-2.1.4-linux2-x86/lib/python/Products/HappySession/HappySession.py, line 255, in _store (Object: SESSION) KeyError: (see above) *********** REPLY SEPARATOR *********** On 31.08.2000 at 19:03 Hung Jung Lu wrote:
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.
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (3)
-
Diego Rodrigo Neufert -
Hung Jung Lu -
Philipp Auersperg