web/application.py
branchstable
changeset 4679 d8ad65dab3e9
parent 4639 82afdc7d8cd8
child 4709 6a71fc0b4274
--- a/web/application.py	Wed Feb 24 10:35:06 2010 +0100
+++ b/web/application.py	Wed Feb 24 10:37:37 2010 +0100
@@ -381,7 +381,11 @@
                         'eidmap': req.data.get('eidmap', {})
                         }
             req.set_session_data(req.form['__errorurl'], forminfo)
-            raise Redirect(req.form['__errorurl'])
+            # XXX form session key / __error_url should be differentiated:
+            # session key is 'url + #<form dom id', though we usually don't want
+            # the browser to move to the form since it hides the global
+            # messages.
+            raise Redirect(req.form['__errorurl'].rsplit('#', 1)[0])
         self.error_handler(req, ex, tb=False)
 
     def error_handler(self, req, ex, tb=False):