[Zope] MailTemplate attachment problem..

2005-10-13 Thread Nicolas Georgakopoulos

Trying to send an attachment I get another error:
strongError Type: Unauthorized/strongbr/
strongError Value: You are not allowed to access 'add_file' in this 
context/strongbr/


and the traceback:
Traceback (innermost last):
  Module ZPublisher.Publish, line 113, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 40, in call_object
Module Shared.DC.Scripts.Bindings, line 311, in __call__
Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
Module Products.PageTemplates.ZopePageTemplate, line 256, in _exec
Module Products.PageTemplates.PageTemplate, line 102, in pt_render
   - ZopePageTemplate at /AtestFordelete/tt
  Module TAL.TALInterpreter, line 206, in __call__
  Module TAL.TALInterpreter, line 250, in interpret
  Module TAL.TALInterpreter, line 426, in do_optTag_tal
  Module TAL.TALInterpreter, line 411, in do_optTag
  Module TAL.TALInterpreter, line 406, in no_tag
  Module TAL.TALInterpreter, line 250, in interpret
  Module TAL.TALInterpreter, line 501, in do_insertText_tal
  Module Products.PageTemplates.TALES, line 227, in evaluateText
Module Products.PageTemplates.TALES, line 221, in evaluate
   - URL: /AtestFordelete/tt
 - Line 12, Column 6
 - Expression: standard:'options/message'
 - Names:
  {'container': Folder at /AtestFordelete,
   'context': Folder at /AtestFordelete,
 'default': Products.PageTemplates.TALES.Default instance at 
0x01152AF8,

   'here': Folder at /AtestFordelete,
 'loop': Products.PageTemplates.TALES.SafeMapping object at 
0x01FC2990,
 'modules': 
Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance at 
0x0112DD50,

 'nothing': None,
   'options': {'args': ()},
 'repeat': Products.PageTemplates.TALES.SafeMapping object at 
0x01FC2990,
   'request': HTTPRequest, 
URL=http://localhost:8080/AtestFordelete/tt,

 'root': Application at ,
   'template': ZopePageTemplate at /AtestFordelete/tt,
 'traverse_subpath': [],
 'user': admin}
Module Products.PageTemplates.Expressions, line 183, in __call__
Module Products.PageTemplates.Expressions, line 171, in _eval
Module Products.PageTemplates.Expressions, line 127, in _eval
 - __traceback_info__: options
  Module Products.PageTemplates.Expressions, line 306, in 
restrictedTraverse
   - __traceback_info__: {'path': ['message'], 
'TraversalRequestNameStack': []}

KeyError: 'message'

I had change all my security options in the folder that contains my 
objects (checked all the boxes on the Manager colum).

Am I doing something wrong?
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] MailTemplate attachment problem..

2005-10-13 Thread Chris Withers
Yes, okay, you said it once, keep saying again and it just pisses people 
off. I know, I'm good at that ;-)


Nicolas Georgakopoulos wrote:

Trying to send an attachment I get another error:
strongError Type: Unauthorized/strongbr/
strongError Value: You are not allowed to access 'add_file' in this 
context/strongbr/


This, which is an Unauthorized error...

  Module Products.PageTemplates.Expressions, line 306, in 
restrictedTraverse
   - __traceback_info__: {'path': ['message'], 
'TraversalRequestNameStack': []}

KeyError: 'message'


...doesn't tie up with this, which is a KeyError

This is a KeyError on mesage, meaning that you're referring to 
options/message but not passing in a message parameter when you're 
calling the MailTemplate.



Am I doing something wrong?


Not reading? ;-)

cheers,

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )