[Zope] Successful use of ZPT and macros in Python Product?

Peter Bengtsson mail@peterbe.com
Sun, 05 May 2002 23:50:35 +0100


At 22:09 2002-05-05 +0200, you wrote:
>Peter Bengtsson writes:
>  > ...
>  > All my little .zpt files start with <html
>  > metal:use-macro="here/StandardLook/macros/standard"> and this doesn't 
> work
>  > unless StandardLook has once been visited.
>I remember this has been a bug in earlier ZPT versions.
>
>I used ZPT in a product and did not experience this problem.
>However, meanwhile, we moved the product to CMF. The original
>product is not used since about 1/2 a year...


...but you had something like::

metal:use-macro="here/StandardLook/macros/standard"


Any chance I can have a look at that product?
What I need to do now each time I refresh my product is to refresh 
http://localhost:8080/<myinstance>/StandardLook

If not, I get the attached error message::



Undefined

Sorry, a site error occurred.

Traceback (innermost last):
   File C:\Program\zope240_2\lib\python\ZPublisher\Publish.py, line 223, in 
publish_module

   File C:\Program\zope240_2\lib\python\ZPublisher\Publish.py, line 187, in 
publish

   File C:\Program\zope240_2\lib\python\Zope\__init__.py, line 226, in 
zpublisher_exception_hook

     (Object: LockableItem)
   File C:\Program\zope240_2\lib\python\ZPublisher\Publish.py, line 171, in 
publish

   File C:\Program\zope240_2\lib\python\ZPublisher\mapply.py, line 160, in 
mapply

     (Object: index_html)
   File C:\Program\zope240_2\lib\python\ZPublisher\Publish.py, line 112, in 
call_object

     (Object: index_html)
   File C:\Program\zope240_2\lib\python\Shared\DC\Scripts\Bindings.py, line 
324, in __call__

     (Object: index_html)
   File C:\Program\zope240_2\lib\python\Shared\DC\Scripts\Bindings.py, line 
354, in _bindAndExec

     (Object: index_html)
   File 
C:\Program\zope240_2\lib\python\Products\PageTemplates\PageTemplateFile.py, 
line 163, in _exec

     (Object: index_html)
   File 
C:\Program\zope240_2\lib\python\Products\PageTemplates\PageTemplate.py, 
line 156, in pt_render

     (Object: index_html)
     (Info: {'container': <IssueTracker instance at 01417130>, 'here': 
<IssueTracker instance at 01417130>, 'modules': 
<Products.PageTemplates.ZRPythonExpr._SecureModuleImporter [THE REQUEST STUFF]
   File C:\Program\zope240_2\lib\python\TAL\TALInterpreter.py, line 229, in 
__call__

   File C:\Program\zope240_2\lib\python\TAL\TALInterpreter.py, line 262, in 
interpret

   File C:\Program\zope240_2\lib\python\TAL\TALInterpreter.py, line 581, in 
do_useMacro

   File 
C:\Program\zope240_2\lib\python\Products\PageTemplates\Expressions.py, line 
198, in _eval

     (Info: here)
   File 
C:\Program\zope240_2\lib\python\Products\PageTemplates\Expressions.py, line 
336, in restrictedTraverse

     (Object: LockableItem)
     (Info: (['StandardLook', 'macros', 'standard'], 1))
Undefined: Sorry, an error occurred