[Zope] frames and external method lookups

Bill Randle billr@coinet.com
Fri, 19 Mar 1999 09:31:42 -0800


I have a DTML Document that references an External Method. This document
is embedded inside another DTML document. If I view this document, then
the page is rendered correctly. If I now take this document and reference
it from a <frame> tag, Zope complains and says it can't find the external
method. What's different here that causing me problems?

Here's some more details, including the traceback:

1. Zope-1.10.2-linux2-x86
2. The innermost DTML docuemnt (lighttablebar) refers to the extermal method
   like this:
	<!--#in expr="looprange(ltblSize)"-->
   'looprange' is my external method and is located in the top level folder
   'ltblSize' is a property of the document that "includes" this document.
   This innermost DTML docuemnt is also located in the top-level folder.
3. The next DTML document (lighttable_frame) includes the previous document
   with a simple #var command (in between some other html stuff):
	<!--#var lighttablebar-->
   This document has a property named 'ltblSize' defined as 6.
   This document lives two folders down from the top-level folder
   I can use the View tab in the manager to see the rendition of this page
   and it looks just fine and there are no complaints about looprange().
4. If I include the previous DTML document in another DTML document that
   is specifying some frames, e.g.:
	<html>
	<head>
	<title>Stock Book</title>
	</head>
	<frameset rows="60%,40%">
	<frame src="<!--#var server_path
		-->/Stockbook/LightTable/lighttable_frame" name="ltable_win">
	<frame src="<!--#var server_path
		-->/Stockbook/LightTable/navigate_frame" name="nav_win">
	</frameset>
	</html>
   When I use the View tab to see what this page looks like, I get the two
   frames, but in the lighttable_frame frame, I get an error message about
   looprange being undefined:
---- start of traceback message ----
The specified module, looprange, couldn't be opened.

Traceback (innermost last):
  File lib/python/ZPublisher/Publish.py, line 877, in publish_module
  File lib/python/ZPublisher/Publish.py, line 590, in publish
    (Info: /Gamba_home/Stockbook/LightTable/lighttable_frame)
  File lib/python/OFS/DTMLDocument.py, line 212, in __call__
    (Object: lighttable_frame)
  File lib/python/OFS/DTMLDocument.py, line 208, in __call__
    (Object: lighttable_frame)
  File lib/python/DocumentTemplate/DT_String.py, line 513, in __call__
    (Object: lighttable_frame)
  File lib/python/OFS/DTMLDocument.py, line 205, in __call__
    (Object: lighttablebar)
  File lib/python/DocumentTemplate/DT_String.py, line 513, in __call__
    (Object: lighttablebar)
  File lib/python/DocumentTemplate/DT_In.py, line 620, in renderwob
    (Object: looprange(ltblSize))
  File lib/python/DocumentTemplate/DT_Util.py, line 266, in eval
    (Object: looprange(ltblSize))
  File <string>, line 0, in ?
  File lib/python/Products/ExternalMethod/ExternalMethod.py, line 233, in
__call__
    (Object: CopySource)
  File lib/python/Products/ExternalMethod/ExternalMethod.py, line 195, in
getFunction
    (Object: CopySource)
  File lib/python/App/Extensions.py, line 137, in getObject
Module Error: (see above)
---- end of traceback message ----

So again, what is happening when the DTML doc is being refered to inside a
frame
that is different than not in a frame (and more to the point, how do I get
around this apparent problem)?

	-Bill Randle
	Central Oregon Internet
	billr@coinet.com