[Zope] DTML to ZPT Question
Michael Murphy
Michael Murphy" <mike@flipper.eskimo.net
Sun, 23 Sep 2001 11:00:49 -0700
I have a DTML to ZPT question that the Zope Guru Community could probably
easily answer.
I am converting an index_html DTML Method to a Page Template, and the
method/template renders the contents of the Folder in a directory-listing
way (iterating over .objectValues([]). There is a particular folder that I
have unchecked the 'Acquire View Permission' on the security tab, and the
DTML version of index_html always seemed to pop up the login dialog...
which is what I want... but the ZPT version of index_html errors with the
stack trace shown at the end of this message. Do I have to explicitly bring
up the login dialog myself when using ZPT to iterate over objects the user
does not have authorization for?
Mike
Traceback (innermost last):
File /opt/Zope-2.4.0-linux2-x86/lib/python/ZPublisher/Publish.py, line
223, in publish_module
File /opt/Zope-2.4.0-linux2-x86/lib/python/ZPublisher/Publish.py, line
187, in publish
File /opt/Zope-2.4.0-linux2-x86/lib/python/Zope/__init__.py, line 226, in
zpublisher_exception_hook
(Object: LockableItem)
File /opt/Zope-2.4.0-linux2-x86/lib/python/ZPublisher/Publish.py, line
171, in publish
File /opt/Zope-2.4.0-linux2-x86/lib/python/ZPublisher/mapply.py, line 160,
in mapply
(Object: index_html)
File /opt/Zope-2.4.0-linux2-x86/lib/python/ZPublisher/Publish.py, line
112, in call_object
(Object: index_html)
File /opt/Zope-2.4.0-linux2-x86/lib/python/Shared/DC/Scripts/Bindings.py,
line 324, in __call__
(Object: index_html)
File /opt/Zope-2.4.0-linux2-x86/lib/python/Shared/DC/Scripts/Bindings.py,
line 354, in _bindAndExec
(Object: index_html)
File /opt/Zope/lib/python/Products/PageTemplates/ZopePageTemplate.py, line
244, in _exec
(Object: index_html)
File /opt/Zope/lib/python/Products/PageTemplates/PageTemplate.py, line
156, in pt_render
(Object: index_html)
(Info: {'container': <Folder instance at 8beee08>,
'here': <Folder instance at 8fc0a70>,
'modules': <Products.PageTemplates.ZRPythonExpr._SecureModuleImporter
instance at 0x8892d84>,
'nothing': None,
'options': {'args': ()},
'request': [----stuff deleted by me----]
'root': <Application instance at 894e948>,
'template': <ZopePageTemplate instance at 8953c60>,
'traverse_subpath': [],
'user': Anonymous User})
File /opt/Zope-2.4.0-linux2-x86/lib/python/TAL/TALInterpreter.py, line
232, in __call__
File /opt/Zope-2.4.0-linux2-x86/lib/python/TAL/TALInterpreter.py, line
265, in interpret
File /opt/Zope-2.4.0-linux2-x86/lib/python/TAL/TALInterpreter.py, line
591, in do_useMacro
File /opt/Zope-2.4.0-linux2-x86/lib/python/TAL/TALInterpreter.py, line
265, in interpret
File /opt/Zope-2.4.0-linux2-x86/lib/python/TAL/TALInterpreter.py, line
614, in do_defineSlot
File /opt/Zope-2.4.0-linux2-x86/lib/python/TAL/TALInterpreter.py, line
265, in interpret
File /opt/Zope-2.4.0-linux2-x86/lib/python/TAL/TALInterpreter.py, line
547, in do_loop_tal
File /opt/Zope-2.4.0-linux2-x86/lib/python/TAL/TALInterpreter.py, line
265, in interpret
File /opt/Zope-2.4.0-linux2-x86/lib/python/TAL/TALInterpreter.py, line
311, in do_startTag
File /opt/Zope-2.4.0-linux2-x86/lib/python/TAL/TALInterpreter.py, line
380, in attrAction_tal
File /opt/Zope/lib/python/Products/PageTemplates/TALES.py, line 303, in
evaluateText
File /opt/Zope/lib/python/Products/PageTemplates/TALES.py, line 294, in
evaluate
Undefined: (see above)