[Zope-CMF] Re: __browser_default__ broken in CMF 1.4.x

Dieter Maurer dieter at handshake.de
Mon Sep 29 13:45:12 EDT 2003


Yuppie wrote at 2003-9-29 12:04 +0200:
 > Andy McKay wrote:
 > >  From what I can tell CMF 1.4x is broken if you try to use 
 > > __browser_default__ (the interface to use something other than index_html).
 > 
 > Note: This is about CMF HEAD, not CMF 1.4.x .
 > 
 > > The following traversal hook in DynamicType.py breaks 
 > > __browser_default__ and sends ZPublisher/BaseRequest.py into an infinite 
 > > loop. Removing this method makes it work just like normal.

I think the bug is more in "ZPublisher/BaseRequest.py".
It should not go into an infinite loop when it gets an empty
"entry_name".

I had to fix the code to prevent the infinite loop in a different context:

                    else:
                        method = default_path[0]
                        entry_name = method
                        # DM: without this, we enter an infinite loop in case "method" is ''
                        if not method: break



Dieter



More information about the Zope-CMF mailing list