Mailing List Archive

[Zope-PTK] Document Error.
Hello all,

I'm having a problem using any DTML documents from within a Portal. I'm
using Zope 2.1.4 (compiled myself so that I could get the MySQL backend to
work), Mandrake Linux 7.0, and the ZopePTK from the morning of 02/27/2000.
I can create documents within a Portal folder (or regular folder), and I can
even create SQL forms and methods. But, when I try to view them, I receive
the following error:

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

and

<snip>
<!--
Traceback (innermost last):
File /usr/local/zope/2-1-4/lib/python/ZPublisher/Publish.py, line 214, in
publish_module
File /usr/local/zope/2-1-4/lib/python/ZPublisher/Publish.py, line 179, in
publish
File /usr/local/zope/2-1-4/lib/python/Zope/__init__.py, line 202, in
zpublisher_exception_hook
(Object: ElementWithAttributes)
File /usr/local/zope/2-1-4/lib/python/ZPublisher/Publish.py, line 165, in
publish
File /usr/local/zope/2-1-4/lib/python/ZPublisher/mapply.py, line 160, in
mapply
(Object: ClassesInsertForm)
File /usr/local/zope/2-1-4/lib/python/ZPublisher/Publish.py, line 102, in
call_object
(Object: ClassesInsertForm)
File /usr/local/zope/2-1-4/lib/python/OFS/DTMLDocument.py, line 166, in
__call__
(Object: ClassesInsertForm)
File /usr/local/zope/2-1-4/lib/python/DocumentTemplate/DT_String.py, line
502, in __call__
(Object: ClassesInsertForm)
File /usr/local/zope/2-1-4/lib/python/OFS/DTMLMethod.py, line 141, in
__call__
(Object: standard_html_header)
File /usr/local/zope/2-1-4/lib/python/DocumentTemplate/DT_String.py, line
502, in __call__
(Object: standard_html_header)
File /usr/local/zope/2-1-4/lib/python/DocumentTemplate/DT_Util.py, line
335, in eval
(Object: getPortal().getToolbox(REQUEST)(this(),REQUEST))
(Info: this)
File &lt;string&gt;, line 0, in ?
File /usr/local/zope/2-1-4/lib/python/Products/PTKBase/Toolbox.py, line
23, in __call__
AttributeError: (see above)
-->
...
</snip>

(I'm also having trouble finding where to place items that I want members to
see in their toolbox, after they log in . But, that's a different problem.
I can always go back to "dtml-var memberbox", right?)

I can view a DTML method just fine, though. I would like to use the Portal
for a Registration site for our Employee Appreciation Day that is coming up,
but I can't get this to work. It used to work in an earlier version of the
Portal, but not now. If I can't get this to work, I may need to find an old
version of the cvs, and get the MySQL backend to work, at least. Any
thoughts on the matter would be greatly appreciated. Take it easy on me,
I'm fairly new to Zope.

Thanks, in advance.

virtually,

Joseph A. Archer
IT Coordinator
Facilities Management
James Madison University
archerja@jmu.edu
Re: [Zope-PTK] Document Error. [ In reply to ]
Do you have a good reason for using DTML Documents rather than DTML
Methods? Not that I doubt that you do, I just want to make sure. DTML
Methods work fine. It's not clear to me why Documents don't acquire
getPortal. I don't use DTML Documents as a rule, could this be by
design? If not, please put this item in the PTK Tracker (if it's not
already there) at:

http://www.zope.org/Products/PTK/Tracker

Mike.

--
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] Document Error. [ In reply to ]
Mike,

It looks like only portions of getPortal() refuse to work. In the Portal's
standard_html_header, "getPortal().title" seems to work fine. I get the
error message when I use "getPortal().getToolbox(REQUEST)(this(),REQUEST)".
I need to be able to use input forms on my site, and I don't want to have to
change them all to DTML methods. (I will if I have to, though.)

To get my site back up and running, I commented-out the
"getPortal().getToolbox..." and decided to use memberbox again. I'm in a
time-crunch, and this looks like the best way to do it.

If I could read the "resolved" items on Tracker, to make sure I don't repost
a submittal, I would be glad to post it to Tracker.

Thank you for all your help, and the fast response. (Sorry about the direct
email, I didn't notice this was a CC.)

virtually,

Joseph A. Archer
IT Coordinator
Facilities Management
James Madison University
archerja@jmu.edu

>
> Do you have a good reason for using DTML Documents rather than DTML
> Methods? Not that I doubt that you do, I just want to make sure. DTML
> Methods work fine. It's not clear to me why Documents don't acquire
> getPortal. I don't use DTML Documents as a rule, could this be by
> design? If not, please put this item in the PTK Tracker (if it's not
> already there) at:
>
> http://www.zope.org/Products/PTK/Tracker
>
> Mike.