[2.12.0b1] Redirect exception not handled properly

Reported by Jürgen Herrmann on 2009-05-06
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zope 2
Undecided
Tres Seaver

Bug Description

running zope 2.12.0b1

Traceback (innermost last):
    * Module ZPublisher.Publish, line 204, in publish_module_standard
    * Module ZPublisher.Publish, line 150, in publish
    * Module Zope2.App.startup, line 249, in __call__
    * Module ZPublisher.Publish, line 119, in publish
    * Module ZPublisher.mapply, line 77, in mapply
    * Module ZPublisher.Publish, line 42, in call_object
    * Module Shared.DC.Scripts.Bindings, line 324, in __call__
    * Module Shared.DC.Scripts.Bindings, line 361, in _bindAndExec
    * Module App.special_dtml, line 185, in _exec
    * Module DocumentTemplate.DT_In, line 634, in renderwob
    * Module DocumentTemplate.DT_Raise, line 68, in render
RuntimeError: http://new-manage.xlhost.local/bliss/logged_out

calling the same script directly works without problems.

description: updated
Hanno Schlichting (hannosch) wrote :

What Python version did you use? Considering the exception happens in DT_Raise I suspect something in the realm of exception handling in general, as this changed in both Python 2.5 and 2.6 to some wide degree. Especially that Exceptions now have to be new-style classes and strings don't work anymore.

Jürgen Herrmann (xlhost) wrote :

i use python 2.4.4 (stock mandriva 2008.1 python)

Andreas Jung (ajung) wrote :
Jürgen Herrmann (xlhost) wrote :

so wtf is all this discussion on zope-dev about dropping python2.4 support about, if it's already deprecated?!

Lennart Regebro (regebro-gmail) wrote :

That discussion is about Zope Toolkit, while this is Zope 2.

Andreas Jung (ajung) wrote :

The requirements are as documented . The discussion ist about Zope3 packages - not related to this issue.

Try again with 2.5 or 2.6 and report back.

Jürgen Herrmann (xlhost) wrote :

ok, i'll try to jump forward to 2.6 now, will take some time...

Jürgen Herrmann (xlhost) wrote :

after 2 hours of:

- compiling python 2.6.2 freshly from source

- making a new virtualenv for my zope

- installing all non-egg dependencies

- fixing 2.6 related code errors (some non-ascii chars in python files):

the error is 100% the same. good news is my 2.4 site-packages directory was cluttered with all kinds of feculence before, now 2.6' site packages is quite clean :)

ChrisW (chris-simplistix) wrote :

As I said on the mailing list, the problem here is the "try it" tab NOT the execution of the python scripts.
I've observed this bug myself since Zope 2.12a1...

Andreas Jung (ajung) wrote :

The issue is caused by

<dtml-else>
  <dtml-raise type="Redirect"><dtml-var URL1></dtml-raise>
</dtml-in>

in dtml/scriptTry.dtml

which is basically DTML turd.

Andreas Jung (ajung) on 2009-05-06
summary: - Script Python's ZScriptHTML_tryForm raises error in ZMI
+ [2.12.0b1]Redirect exception not handled properly
summary: - [2.12.0b1]Redirect exception not handled properly
+ [2.12.0b1] Redirect exception not handled properly

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

 status inprogress
 assignee tseaver

- --
===================================================================
Tres Seaver +1 540-429-0999 <email address hidden>
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFKAa4d+gerLs4ltQ4RAqsQAKDMIvqhnCHzo5hwtsVXQHYgRjzKtACfVCwE
S2saXsSx0i3Oq1/d+zN+Fzw=
=jcEO
-----END PGP SIGNATURE-----

Changed in zope2:
assignee: nobody → Tres Seaver (tseaver)
status: New → In Progress

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

 status fixcommitted

I added an API, 'convertExceptionType', to zExceptions (w/ tests):

 - http://svn.zope.org/Zope/trunk/?rev=99791&view=rev

I then made the <dtml-raise> implementation use the new
'convertExceptionType' API (including tests):

 - http://svn.zope.org/Zope/trunk/?rev=99792&view=rev

The "Try" tab now renders for me properly, even with no params defined
for the script.

Tres.
- --
===================================================================
Tres Seaver +1 540-429-0999 <email address hidden>
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFKAbln+gerLs4ltQ4RAtNzAKCqKu7z//qQY1ju3dmWEQ6idMxQ/QCdHcHj
u7lqcwT397YAk5Bj7T2Hj3I=
=UVP6
-----END PGP SIGNATURE-----

Changed in zope2:
status: In Progress → Fix Committed
Changed in zope2:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers