AW: [Zope3-Users] z3c.pagelet, z3c.layer.pagelet and error views notworking(Unauthorized)

Roger Ineichen dev at projekt01.ch
Wed Jun 4 08:14:03 EDT 2008


Hi Nylan
 
> Betreff: [Zope3-Users] z3c.pagelet, z3c.layer.pagelet and 
> error views notworking(Unauthorized)
> 
> Hello, I'm having a serious problem with z3c.pagelet and 
> z3c.layer.pagelet.
> 
> I've created my own layer based on 
> IFormLayer,IDivFormLayer,IPageletBrowserLayer.
> Layer and skin work fine.
> Only with PAU zope doesn't redirect to login page when 
> Unauthorized is thrown. 

Did you check the following?

This could happen if you access a public view and this view
will access a protected object. Then you run into Unauthorized
exception but since the rendering of the pagelet allready 
started, there is no way to show the right Unauthorized view
for that. 

But of corse it could be something different. I whould
at least trace the involved obejcts with pdb and check if 
the right object get used. Probably a wrong view get used
because of a to generic configuration.

Regards
Roger Ineichen

> Zope always displays:
> --------------------------------------
> URL: http://localhost:8888/manage.html
> Module paste.evalexception.middleware:306 in respond        
> .....
> Module zope.publisher.publish:130 in publish        
> Module zope.publisher.browser:539 in traverse        
> Module zope.app.publication.browser:66 in getDefaultTraversal        
> Unauthorized: (<z3c.pagelet.zcml.Manage object at 0x22a2f90>,
> 'browserDefault','zope.ManageContent')
> --------------------------------------
> 
> Questions:
> 1. Why doesn't the redirect in the credentialsplugins challenge work?
> 2. The redirect doesn't work. 
>    Why isn't zope displaying the error view registered for 
> IUnauthorized?
> 
> 
> 
> I've found several similar issues:
> 1.  
> http://thread.gmane.org/gmane.comp.web.zope.zope3.user/6468/focus=6469
> 2.  
> http://thread.gmane.org/gmane.comp.web.zope.zope3.user/7539/focus=7544
> 
> I've checked my sources for every hint found above, without 
> success(z3c.layer.pagelet configure.zcml is included)
> 
> Did I include "wrong" packages?
> 
> I'll provide information as necessary.
> 
> Help greatly appreciated.
> 
> Best regards!
> 
> _______________________________________________
> Zope3-users mailing list
> Zope3-users at zope.org
> http://mail.zope.org/mailman/listinfo/zope3-users
> 



More information about the Zope3-users mailing list