[Zope] Problems with LoginManager 0.8.8b1

Jeff Hoffman jeff.hoffman@goingv.com
Sun, 5 Nov 2000 16:02:14 -0500 (EST)


Hello,

I am having an odd problem with LoginManager 0.8.8b1 and am writing the
list in the hopes that someone can either help me out, or confirm that
I've encountered a bug.

I am running Zope 2.2.2 with Python 1.5.2 on a Linux box. I installed
LoginManager as described, and compiled DynPersist and so forth for
ZPatterns. All seems to be working well.

I created a temporary folder called 'sandbox', inside of which I
instantiated a LoginManager. In its UserSource (a Generic User Source), I
created four Python Methods (with Python Methods v0.1.7):

  ---
  userAuthenticate
  <params>self, REQUEST, username, password</params>

  if username == 'XXX' and password == 'XXX':
    return 1
  else:
    return 0
  ---
  userExists
  <params>self, REQUEST, username</params>

  if username == 'XXX':
    return 1
  else:
    return 0
  ---
  userDomains
  <params>self, REQUEST, username</params>

  return []
  ---
  userRoles
  <params>self, REQUEST, username</params>

  if username == 'XXX':
    return ['Manager', 'Member']
  else:
    return ['Member']

Once done, I pointed my browser to http://myhost/sandbox/index_html. This
method is a standard DTML Method, inluding standard_html_header and footer
and putting some text in the middle.

I get the following error:

Traceback (innermost last):
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 222, in
publish_module
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 187, in
publish
  File /usr/local/zope/lib/python/Zope/__init__.py, line 221, in
zpublisher_exception_hook
    (Object: Traversable)
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 171, in
publish
  File /usr/local/zope/lib/python/ZPublisher/mapply.py, line 160, in
mapply
    (Object: index_html)
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 112, in
call_object
    (Object: index_html)
  File /usr/local/zope/lib/python/OFS/DTMLMethod.py, line 172, in __call__
    (Object: index_html)
  File /usr/local/zope/lib/python/DocumentTemplate/DT_String.py, line 528,
in __call__
    (Object: index_html)
KeyError: standard_html_header

Zope can't find standard_html_header. I am guessing the acquisition path
is getting hosed somewhere along the way. If I simply delete acl_users
from sandbox (my LoginManager), index_html works fine. Moreover, it is not
just standard_html_header that I can't acquire. I created a DTML Method
called foo, and could not acquire it, either.

Any ideas?

--Jeff

---
Jeff K. Hoffman                               704.849.0731 x108
Chief Technology Officer                      mailto:jeff.hoffman@goingv.com
Going Virtual, L.L.C.                         http://www.goingv.com/