[Zope-dev] Unauthorized handling in Zope2

Wichert Akkerman wichert at wiggy.net
Tue Apr 20 08:38:04 EDT 2010


On 4/20/10 09:51 , yuppie wrote:
> Hi!
>
>
> Wichert Akkerman wrote:
>> v is the html as generated by my view. Reraising the exception transfers
>> control to the bare except in
>> ZPublisher.Publish.publish_module_standard, which generates the standard
>> site error page and returns that.
>
> Could it be that your v is unicode?

Indeed it is: Chameleon returns a unicode response it seems.

> Please let me know if the attached patch fixes the issue.

I'm afraid it doesn't. The result is this:

   Site Error

   An error was encountered while publishing this resource.

   Unauthorized

   Sorry, a site error occurred.
   Traceback (innermost last):

   Module ZPublisher.Publish, line 238, in publish_module_standard
   Module Products.PDBDebugMode.runcall, line 83, in pdb_publish
   Module ZPublisher.Publish, line 165, in publish
   Module plone.app.linkintegrity.monkey, line 21, in 
zpublisher_exception_hook_wrapper
   Module ZPublisher.Publish, line 116, in publish
   Module ZPublisher.BaseRequest, line 609, in traverse
   Module ZPublisher.HTTPResponse, line 720, in unauthorized
   Unauthorized: <unprintable Unauthorized object>

Wichert.


More information about the Zope-Dev mailing list