[Zope-PTK] Adding stuff to a portal

Tres Seaver tseaver@palladion.com
Sat, 19 Feb 2000 14:22:15 -0600


Bill Anderson wrote:
> 
> Mike Pelletier wrote:
> >
> > On Thu, 10 Feb 2000, Bill Anderson wrote:
> >
> > > OK, have the latest CVS of the PTK, works fine, with a few caveats.
> > >
> > > o I can't add any additional folders (og PTK or standard variety),
> > > ZDiscussions, etc. I have succesfully and effortlessly put a
> > > KnowledgeBas ein, but everything else I try returns the following
> > > traceback.
> >
> >     I'm not certain what's happened here.  Since the DTML was able to find
> > getPortal (in the object's context) I can't see why Toolbox.__call__ was
> > unable to find that method on the object.  Furthermore, I can't reproduce
> > the problem.  Is it possible that I could examine your site myself?
> 
> I have narrowed it down to DTML Documents. DTML Methods work fine, DTML
> Documents (and apparently Documents as well) barf.
> 
> > > o Member pages (ZODB) have to have an extra index_html tacked on to
> > > them, or suffer an attribute error for __call__.
> >
> >     This is kind of ugly.  Zope seems to treat objects called 'index_html'
> > differently, though I don't know this for certain.  It seems as though it
> > never looks for an 'index_html' method on an object named 'index_html'.
> > If I add '__call__=index_html' to the class, the DTML method is called but
> > not in the context of the object (??!) so there are KeyErrors trying to
> > reference any of the object's attributes.  This deserves some more of my
> > attention.  Suggestions are appreciated!

This sounds exactly like the "ZClasses can't be index_html" problem.  The fix
for that is to add code to the ZClass_for_Object (or whatever) to allow the
object to render (like what Lalo's RenderableZClass product providers).

> I am wondering if thisn't an artifact specific to Documents after what I
> learned tonight ...
> 
> Is it possible we are seeing an Aquisition problem? My Zen on
> Acquisition could use some work, but I get this sneaky feeling that the
> problem lies in there somewhere. Then again, I've been zoping for
> hours... %^}

"Please,....zope responsibly!" :)

Tres.
-- 
=========================================================
Tres Seaver         tseaver@palladion.com    713-523-6582
Palladion Software  http://www.palladion.com