[Zope] BUG?? Acquisition && External Methods
Samuel A. Falvo II
kc5tja@dolphin.openprojects.net
Mon, 16 Aug 1999 19:10:09 -0700
Well, I upgraded to 2.0.0b4, and I think I found a bug, but am not sure. So
I'm posting it to the list for all to review first.
I have defined index_html as so in the root folder:
<!--#var pre_content-->
<!--#var content-->
<!--#var post_content-->
This index_html file is shared throughout the website. Then I define
pre_content so as to display banners and set up the tables for the rest of
the page layout. The idea is that each folder has a "content" method, which
contains the meat of the page, with pre_content and post_content being
shared across all pages.
post_content closes the HTML tags opened in pre_content, of course, and
calls <!--#var copyright-->, which displays our company's copyright message.
The copyright method, in turn, makes a reference:
<!--#var BASE1-->
Problem is, this *FAILS*. I get the following tracebac (cleaned up from the
original HTML):
Error type: KeyError
Error value: BASE1
Traceback (innermost last):
File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 209, in publish_module
File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 179, in publish
File /usr/local/zope/lib/python/Zope/__init__.py, line 199, in zpublisher_exception_hook (Object: ApplicationDefaultPermissions)
File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 165, in publish
File /usr/local/zope/lib/python/ZPublisher/mapply.py, line 154, 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)
File /usr/local/zope/lib/python/OFS/DTMLMethod.py, line, 141, in __call__ (Object: index_html)
File /usr/local/zope/lib/python/DocumentTemplate/DT_String.py, line 502, in __call__ (Object: index_html)
File /usr/local/zope/lib/python/OFS/DTMLMethod.py, line, 141, in __call__ (Object: index_html)
File /usr/local/zope/lib/python/DocumentTemplate/DT_String.py, line 502, in __call__ (Object: index_html)
KeyError: (see above)
Please note that I get this error with BASE, BASE1, URL0, URL1, URL2, etc.
NOW, if I create an external method:
def PriceQuote( self, RESULT, RESPONSE ):
return RESULT
I find in the resulting display that BASE, BASE1, URL1, URL2, etc., -->ARE
DEFINED AND SET CORRECTLY<--.
Anyone care to tell me why Zope is being utterly boneheaded about <!--#var
BASE1-->?? I've been banging my head against the wall with this one for
hours. I've got no choice but to hardcode a URL into the copyright code,
which is fine for now, but certainly not the ideal solution -- I'd really
rather have it as hardwired-free as possible.
==========================================================================
KC5TJA/6 | -| TEAM DOLPHIN |-
DM13 | Samuel A. Falvo II
QRP-L #1447 | http://www.dolphin.openprojects.net
Oceanside, CA |......................................................