[BlueBream] Exception views, again

Michael Howitz mh at gocept.com
Mon Aug 16 03:54:32 EDT 2010

Am 16.08.2010 um 08:37 schrieb Baiju M:
> On Mon, Aug 16, 2010 at 8:41 AM, Baiju M <baiju.m.mail at gmail.com> wrote:
>> Hi Justin!
>> On Mon, Aug 9, 2010 at 1:15 PM, Justin Ryan <jryan at reliefgarden.org> wrote:
>>>>> I actually thought some of the docs I saw might smell like that, but
>>>>> trying your sample directive above isn't working.
>>>> Really strange. I added my changed version to this e-mail. (I even tried to copy my ZCML code from above to a fresh copy of your unauth-test and it worked: when accessing a page which does not exists the browser shows: "login required")
>>> Thank you, Michael, for taking the time here.
>>> I must have made a mistake, somehow.  I could swear I also cut and
>>> pasted, but perhaps not.
>> Is your problem solved now ?
>> If not, can you add these two include directives to etc/site.zcml just
>> before including your package:
>>  <include package="zope.app.http" />
>>  <include package="zope.app.exception.browser" />
> I wonder whether we need to include this in our default site.zcml

Why should this be necessary?

>> Also use "deploy.ini" instead of "debug.ini" to start WSGI server.
> Can anyone explain why "debug.ini" is not working when there
> is an exception.  Is this the correct behaviour ?
> I guess it must be due to our WSGI middle-ware:
>  [filter-app:main]
>  # Change the last part from 'ajax' to 'pdb' for a post-mortem debugger
>  # on the console:
>  use = egg:z3c.evalexception#ajax
>  next = zope

This should display a nice ajax form in the browser to debug the exception.
At least it works together with z3c.layer.pagelet.

> We need to document this, so if anyone digg and figure out the details,
> that would be great.

There is another problem which should be documented:
"Unauthorized" is an exception which is caught by z3c.evalexception. I think, it is impossible to decide whether the exception was raised because the user was not authorized initially or because he has not enough permissions.
This only happens for basic auth.

A solution could be:
- start with deploy.init
- authorized using basic auth
- restart using debug.ini

Yours sincerely,
Michael Howitz · mh at gocept.com · software developer
gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 8 · fax +49 345 1229889 1
Zope and Plone consulting and development

More information about the bluebream mailing list