[Zope] newbie zclass-subclassing problem

John Edstrom edstrom@teleport.com
Tue, 12 Oct 1999 18:08:40 -0700


I'm having problems making zclasses that are subclasses of existing
classes.  

I want something like a folder with a few properties and some methods to
display its contents in a particular format.  If I make a zclass as a
subclass of Object Manager, put in some properties (title, blurb,
author... all short text), and an index_html method, all goes well.

The problem comes when I try to add another method, for example a dtml
document object.  If I try to refer to the document in any way that I
can think of, I get challenged for authorization for Zope (no valid user
name works, not even superuser) and I get this error:


  Zope Error

  Zope has encountered an error while publishing this resource. 

  Unauthorized

  You are not authorized to access mydoc. 

  Traceback (innermost last):
    File /usr/local/Zope/lib/python/ZPublisher/Publish.py, line 214, in
publish_module
    File /usr/local/Zope/lib/python/ZPublisher/Publish.py, line 179, in
publish
    File /usr/local/Zope/lib/python/ZPublisher/Publish.py, line 165, in
publish
    File /usr/local/Zope/lib/python/ZPublisher/mapply.py, line 160, in
mapply
      (Object: index_html)
    File /usr/local/Zope/lib/python/ZPublisher/Publish.py, line 102, in
call_object
      (Object: index_html)
    File /usr/local/Zope/lib/python/OFS/DTMLMethod.py, line 145, in
__call__
      (Object: index_html)
    File /usr/local/Zope/lib/python/DocumentTemplate/DT_String.py, line
502, in __call__
      (Object: index_html)
  Unauthorized: (see above)


the index_html has:
...
	<BR>The doc is: <dtml-var mydoc>
...

mydoc is:
	Hello, world.




It seems like such a simple problem, I must be missing something really
basic here.  I've tried setting all of the permissions to anonymous,
proxying Owner on the dtml documents... nothing seems to work.  

Is there any intermediate-level documentation for Zope anywhere?  I can
do the simple things, OK and the wizard-stuff is out of my league.


--  
 John Edstrom | edstrom @ slugo.hmsc.orst.edu

 http://bubo.hmsc.orst.edu/~edstrom