[Zope-CMF] Re: Installing a CMF Content Type from scratch

Charlie Clark charlie at begeistert.org
Wed Jan 10 07:52:33 EST 2007


Am 10.01.2007 um 12:52 schrieb Charlie Clark:

> Okay, next problem. Getting an error trying to access the context  
> in the edit_form.py or view.py scripts.
>
> Unauthorized: Not authorized to access binding: context

Silly me! Always pays to look at the full traceback!

2007-01-10 13:49:45 ERROR root Exception while rendering an error  
message
Traceback (most recent call last):
   File "/opt/Zope-2.9/lib/python/OFS/SimpleItem.py", line 223, in  
raise_standardErrorMessage
     v = s(**kwargs)
   File "/opt/Zope-2.9/lib/python/Shared/DC/Scripts/Bindings.py",  
line 311, in __call__
     return self._bindAndExec(args, kw, None)
   File "/opt/Zope-2.9/lib/python/Shared/DC/Scripts/Bindings.py",  
line 348, in _bindAndExec
     return self._exec(bound_data, args, kw)
   File "/Users/charlieclark/eGenix.com/Products/CMFCore/ 
FSPageTemplate.py", line 196, in _exec
     result = self.pt_render(extra_context=bound_names)
   File "/Users/charlieclark/eGenix.com/Products/CMFCore/ 
FSPageTemplate.py", line 135, in pt_render
     result = FSPageTemplate.inheritedAttribute('pt_render')(
   File "/opt/Zope-2.9/lib/python/Products/PageTemplates/ 
PageTemplate.py", line 105, in pt_render
     tal=not source, strictinsert=0)()
   File "/opt/Zope-2.9/lib/python/TAL/TALInterpreter.py", line 238,  
in __call__
     self.interpret(self.program)
   File "/opt/Zope-2.9/lib/python/TAL/TALInterpreter.py", line 281,  
in interpret
     handlers[opcode](self, args)
   File "/opt/Zope-2.9/lib/python/TAL/TALInterpreter.py", line 735,  
in do_useMacro
     macro = self.engine.evaluateMacro(macroExpr)
   File "/opt/Zope-2.9/lib/python/Products/PageTemplates/TALES.py",  
line 221, in evaluate
     return expression(self)
   File "/opt/Zope-2.9/lib/python/Products/PageTemplates/ 
Expressions.py", line 185, in __call__
     return self._eval(econtext)
   File "/opt/Zope-2.9/lib/python/Products/PageTemplates/ 
Expressions.py", line 173, in _eval
     ob = self._subexprs[-1](econtext)
   File "/opt/Zope-2.9/lib/python/Products/PageTemplates/ 
Expressions.py", line 127, in _eval
     ob = restrictedTraverse(ob, path, getSecurityManager())
   File "/opt/Zope-2.9/lib/python/Products/PageTemplates/ 
Expressions.py", line 284, in restrictedTraverse
     t=get(object, '__bobo_traverse__', N)
   File "/opt/Zope-2.9/lib/python/Shared/DC/Scripts/Bindings.py",  
line 180, in __getattr__
     self.__you_lose()
   File "/opt/Zope-2.9/lib/python/Shared/DC/Scripts/Bindings.py",  
line 187, in __you_lose
     raise Unauthorized('Not authorized to access binding: %s' % name)
Unauthorized: Not authorized to access binding: context

So, it is actually the Templates that are being blocked from  
accessing the context! Unfortunately I do not understand why this  
should be the case.

Charlie
--
Charlie Clark
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-938-5360
GSM: +49-178-782-6226





More information about the Zope-CMF mailing list