[Zope3-dev] Need UI defect advice

Dave Harris dpharris76 at msn.com
Sat Jan 10 06:08:07 EST 2004


I've gotten near the root of one of the UI defects I'm chasing down, but the 
number of items involved is testing my ability to understand how things 
should work. If anyone can advise me on what really is supposed to be 
happening, I would greatly appreciate it. (BTW, by the time you read this, I 
may have even more questions. My postings have been getting hung up for two 
days at a time for moderator review.)

Platform: Windows XP, Python 2.3.3, Zope3 from CVS

The defect is easy to reproduce. Go to http://localhost:8080/manage. Click 
on Manage Process. On the Manage Process page, click on Introspector. A 
sparse page will appear which says simply 'A system error occurred.'

Question #1: Is the Introspector link supposed to be on the Manage Process 
page?

The error page comes from zope/app/browser/exception/default.pt, which seems 
to me that some sort of exception happened.

When you place the cursor over the Introspector link, the status bar shows 
the link address as 
http://localhost:8080/++etc++process/@@classBrowser.html. Following that 
lead took me to zope/app/browser/introspector.zcml and the IntrospectorView 
class in zope/app/browser/introspector.py. Adding diagnostic code to 
getInterfaceURL, I found that I could not display/write the url assigned 
from zapi.getView(interfaces, 'absolute_url', self.request). An untrapped 
TypeError exception is occurring when a string conversion is attempted on 
the url variable. Specifically, it
happens in the return from getInterfaceURL:
    return "%s/detail.html?id=%s" % (url, name)
The __str__ function in zope/app/browser/absoluteurl.py is responsible.

Question #2: Is the TypeError exception supposed to untrapped as a matter of 
convenience?

Question #3: Should a unit test be written for this incident?

The TypeError exception is accompanied by the message: "There isn't enough 
context to get URL information. This is probably due to a bug in setting up 
location information."

Question #4: _Should_ I be looking for a bad location setup (whatever that 
is)?

I am at the point where I have to dig into the origin of the 'url'. It could 
be zapi.getView generating a bad value, or it could be absoluteurl.__str__ 
slipping up. Or maybe something else entirely.

I'm wondering at this point if I'm flinging otters. If the 'System Error' 
page is expected and acceptable, then there is no defect. If the 
Introspector link is not supposed to be on the Manage Process page, that 
would eliminate one path into the IntrospectorView class.

Thanks in advance for your help,
Dave Harris 



More information about the Zope3-dev mailing list