[Zope] adding a product

Ulrich Wisser u.wisser@publisher.de
Sat, 10 Mar 2001 20:09:51 +0100


Hello,

I installed Yihaw and ran into the problem to add
Yihaw items from my own dtml methods. From the HowTo
(thanks S=F8ren) I found some hints, but no solution.
The problem is, that the items are not directly in
the product folder, but instead are inside the YihawChannel
ZClass. So here is what I try to do:


   <dtml-with "news.manage_addProduct['YihawDirectory']">
     <dtml-with YihawChannel>
       <dtml-call "YihawNewsItem_add(_.None, _)">
     </dtml-with>
   </dtml-with>

I try to add a YihawNewsItem to my /news (Yihaw-)Folder.
So far I was only able to get a security violation. Please
find the traceback below.

What do I do wrong?

Thanks

Ulrich

Zope Error
Zope has encountered an error while publishing this resource.
Unauthorized
You are not authorized to access YihawNewsItem_add.
Traceback (innermost last):
   File /usr/local/Zope-2.2.5-linux2-x86/lib/python/ZPublisher/Publish.py,=
=20
line 222, in publish_module
   File /usr/local/Zope-2.2.5-linux2-x86/lib/python/ZPublisher/Publish.py,=
=20
line 187, in publish
   File /usr/local/Zope-2.2.5-linux2-x86/lib/python/ZPublisher/Publish.py,=
=20
line 171, in publish
   File /usr/local/Zope-2.2.5-linux2-x86/lib/python/ZPublisher/mapply.py,=20
line 160, in mapply
     (Object: dtNews)
   File /usr/local/Zope-2.2.5-linux2-x86/lib/python/ZPublisher/Publish.py,=
=20
line 112, in call_object
     (Object: dtNews)
   File /usr/local/Zope-2.2.5-linux2-x86/lib/python/OFS/DTMLMethod.py, line=
=20
172, in __call__
     (Object: dtNews)
   File=20
/usr/local/Zope-2.2.5-linux2-x86/lib/python/DocumentTemplate/DT_String.py,=
=20
line 528, in __call__
     (Object: dtNews)
   File=20
/usr/local/Zope-2.2.5-linux2-x86/lib/python/DocumentTemplate/DT_With.py,=20
line 146, in render
     (Object: news.manage_addProduct['YihawDirectory'])
   File=20
/usr/local/Zope-2.2.5-linux2-x86/lib/python/DocumentTemplate/DT_With.py,=20
line 146, in render
     (Object: YihawChannel)
   File=20
/usr/local/Zope-2.2.5-linux2-x86/lib/python/DocumentTemplate/DT_Util.py,=20
line 331, in eval
     (Object: YihawNewsItem_add(_.None, _))
     (Info: YihawNewsItem_add)
   File /usr/local/Zope-2.2.5-linux2-x86/lib/python/OFS/DTMLMethod.py, line=
=20
194, in validate
     (Object: dtNews)
   File=20
/usr/local/Zope-2.2.5-linux2-x86/lib/python/AccessControl/SecurityManager.py=
,=20
line 139, in validate
   File=20
/usr/local/Zope-2.2.5-linux2-x86/lib/python/AccessControl/ZopeSecurityPolicy=
.py,=20
line 209, in validate
Unauthorized: (see above)

--=20
Searchengine Know How  - Webpromotion - Optimization - Internal Search
World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg
http://www.publisher.de   Tel: +46-8-53460905    Fax: +46-8-534 609 06