Mailing List Archive

[Zope-PTK] Adding stuff to a portal
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.

o Member pages (ZODB) have to have an extra index_html tacked on to
them, or suffer an attribute error for __call__.

This latter would not be an issue in at least two of my sites, where I
removed the ability to have the userfolder accessible. :)

=============================
<TD WIDTH="90%">
<H2>Something went wrong!</H2>
<P>I have encountered an error while publishing this resource.
</P>

<P>
<STRONG>Error Type: AttributeError</STRONG><BR>
<STRONG>Error Value: getPortal</STRONG><BR>
</P>

<HR NOSHADE>

<P>Troubleshooting Suggestions</P>

<UL>
<LI>The URL may be incorrect.</LI>

[...]

</body>
</html>
<!--
Traceback (innermost last):
File /home/web/www.libc.org/lib/python/ZPublisher/Publish.py, line
214, in publish_module
File /home/web/www.libc.org/lib/python/ZPublisher/Publish.py, line
179, in publish
File /home/web/www.libc.org/lib/python/Zope/__init__.py, line 202, in
zpublisher_exception_hook
(Object: ElementWithAttributes)
File /home/web/www.libc.org/lib/python/ZPublisher/Publish.py, line
165, in publish
File /home/web/www.libc.org/lib/python/ZPublisher/mapply.py, line 160,
in mapply
(Object: index_html)
File /home/web/www.libc.org/lib/python/ZPublisher/Publish.py, line
102, in call_object
(Object: index_html)
File /home/web/www.libc.org/lib/python/OFS/DTMLDocument.py, line 166,
in __call__
(Object: index_html)
File /home/web/www.libc.org/lib/python/DocumentTemplate/DT_String.py,
line 502, in __call__
(Object: index_html)
File /home/web/www.libc.org/lib/python/OFS/DTMLMethod.py, line 141, in
__call__
(Object: standard_html_header)
File /home/web/www.libc.org/lib/python/DocumentTemplate/DT_String.py,
line 502, in __call__
(Object: standard_html_header)
File /home/web/www.libc.org/lib/python/DocumentTemplate/DT_Util.py,
line 335, in eval
(Object: getPortal().getToolbox(REQUEST)(this(),REQUEST))
(Info: this)
File <string>, line 0, in ?
File /home/web/www.libc.org/lib/python/Products/PTKBase/Toolbox.py,
line 23, in __call__
AttributeError: (see above)
-->
===============



--
In flying I have learned that carelessness and overconfidence are
usually far more dangerous than deliberately accepted risks.
-- Wilbur Wright in a letter to his father, September 1900
Re: [Zope-PTK] Adding stuff to a portal [ In reply to ]
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?

> 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!


--
Mike Pelletier email: mike@digicool.com
Mild mannered software developer icq: 7127228
by day, super villain by night. phone: 519-884-2434
Re: [Zope-PTK] Adding stuff to a portal [ In reply to ]
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!

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... %^}

Bill

--
In flying I have learned that carelessness and overconfidence are
usually far more dangerous than deliberately accepted risks.
-- Wilbur Wright in a letter to his father, September 1900
Re: [Zope-PTK] Adding stuff to a portal [ In reply to ]
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