[Bug] trailing blank bug reappeared? (was:: [Zope] property to method and back again)

Dieter Maurer dieter@handshake.de
Fri, 5 Apr 2002 23:26:07 +0200


Mark James Adams writes:
 > ....
 > so I
 > deleted the title property. I then created a Python method 
 > called 'title' in the ZClass, which would return a non-marked up title.
 > 
 > But now I get "KeyError: title" everytime a try to view the methods in 
 > the ZClass.
 > 
 > I wrote a script to examine the ZClass, and placed it in the ZClass's 
 > product's folder:
 > 
 > <dtml-in "MyZClass.propertysheets.methods.objectIds()">
 > <p><dtml-var sequence-item>
 > </dtml-in>
 > 
 > This script returns the following:
 > 
 > method1
 > method2
 > etc..
 > title
 > 
 > So the 'title' python script is obviously in the ZClass, but if I try to 
 > access:
 > 
 > /Control_Panel/Products/MyProduct/MyZClass/propertysheets/methods/title/manage_main
 > 
 > I get, "Site Error: Resource not found".
Do you run in debug mode?

When I try to reproduce your problem (in debug mode), I get

    The object at
    http://localhost:8080/Control_Panel/Products/Test/JobZClass/propertysheets/methods/title
    has an empty or missing docstring.
    Objects must have a docstring to be published.

It is caused be the trailing blank bug. The method is not called
"title" but "title " (note the trailing blank).

Try to access:

  /Control_Panel/Products/MyProduct/MyZClass/propertysheets/methods/title%20/manage_main


The trailing blank bug is very old. I had expected, it were
fixed a long time ago...


Dieter