[Zope] Acquisition problem?

Andrew Athan aathan-zope-list%REMOVEME@memeplex.com
Fri, 6 Apr 2001 02:47:58 -0400


This is a multi-part message in MIME format.

------=_NextPart_000_00C4_01C0BE43.FD0D56D0
Content-Type: text/plain;
	charset="Windows-1252"
Content-Transfer-Encoding: 7bit


I'm trying to use LoginManager and am running into a little problem, which
I'm sure is based in a not-deep-enough understanding of acquisition issues.

Bloop
---acl_users
------Z MySQL DA
------SQL_get_password   [SQL Method, taking username & password parameters,
tested & works]
------xuserAuthenticate   [DTML Method:  contains the line <dtml-in
"SQL_get_password(username='foo',password='bar')">]
------Test              [DTML Method:  contains the line <dtml-let
ret="xuserAuthenticate(username='foo',password='bar')">


If I try to "view" Test, then I get the nasty traceback below.  If I view
xuserAuthenticate, no such error is reported.  I suppose this is because
dtml-let puts a "strange" acquisition context in place during the execution
of xuserAuthenticate...an execution context that does not include the
containing folder of Test (namely acl_users).  Or is this due to some
strange properties that I am not yet familiar with of acl_user folders?

Traceback (innermost last):
  File D:\CLOAKM~1\lib\python\ZPublisher\Publish.py, line 223, in
publish_module
  File D:\CLOAKM~1\lib\python\ZPublisher\Publish.py, line 187, in publish
  File D:\CLOAKM~1\lib\python\Zope\__init__.py, line 221, in
zpublisher_exception_hook
    (Object: ProviderContainer)
  File D:\CLOAKM~1\lib\python\ZPublisher\Publish.py, line 171, in publish
  File D:\CLOAKM~1\lib\python\ZPublisher\mapply.py, line 160, in mapply
    (Object: Testing2)
  File D:\CLOAKM~1\lib\python\ZPublisher\Publish.py, line 112, in
call_object
    (Object: Testing2)
  File D:\CLOAKM~1\lib\python\OFS\DTMLMethod.py, line 189, in __call__
    (Object: Testing2)
  File D:\CloakMail\lib\python\DocumentTemplate\DT_String.py, line 549, in
__call__
    (Object: Testing2)
  File D:\CLOAKM~1\lib\python\DocumentTemplate\DT_Let.py, line 146, in
render
    (Object: ret="xuserAuthenticate(username='foo',password='bar')")
  File D:\CLOAKM~1\lib\python\DocumentTemplate\DT_Util.py, line 334, in eval
    (Object: xuserAuthenticate(username='foo',password='bar'))
    (Info: xuserAuthenticate)
  File <string>, line 0, in ?
  File D:\CLOAKM~1\lib\python\OFS\DTMLMethod.py, line 182, in __call__
    (Object: xuserAuthenticate)
  File D:\CloakMail\lib\python\DocumentTemplate\DT_String.py, line 549, in
__call__
    (Object: xuserAuthenticate)
  File D:\CLOAKM~1\lib\python\DocumentTemplate\DT_In.py, line 649, in
renderwob
    (Object: SQL_get_password(username='foo',password='bar'))
  File D:\CLOAKM~1\lib\python\DocumentTemplate\DT_Util.py, line 334, in eval
    (Object: SQL_get_password(username='foo',password='bar'))
    (Info: SQL_get_password)
  File <string>, line 0, in ?
NameError: (see above)


------=_NextPart_000_00C4_01C0BE43.FD0D56D0
Content-Type: text/html;
	charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dwindows-1252">
<META content=3D"MSHTML 5.50.4611.1300" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><SPAN class=3D576163906-06042001><FONT face=3DArial size=3D2>I'm =
trying to use=20
LoginManager and am running into a little problem, which I'm sure is =
based in a=20
not-deep-enough understanding of acquisition issues.</FONT></SPAN></DIV>
<DIV><SPAN class=3D576163906-06042001><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D576163906-06042001><FONT face=3DArial=20
size=3D2>Bloop</FONT></SPAN></DIV>
<DIV><SPAN class=3D576163906-06042001><FONT face=3DArial=20
size=3D2>---acl_users</FONT></SPAN></DIV>
<DIV><SPAN class=3D576163906-06042001><FONT face=3DArial =
size=3D2>------Z MySQL=20
DA</FONT></SPAN></DIV>
<DIV><SPAN class=3D576163906-06042001><FONT face=3DArial=20
size=3D2>------SQL_get_password&nbsp;&nbsp; [SQL Method, taking username =
&amp;=20
password parameters, tested &amp; works]</FONT></SPAN></DIV>
<DIV><SPAN class=3D576163906-06042001><FONT face=3DArial=20
size=3D2>------xuserAuthenticate&nbsp;&nbsp; [DTML Method:&nbsp; =
contains the line=20
&lt;dtml-in=20
"SQL_get_password(username=3D'foo',password=3D'bar')"&gt;]</FONT></SPAN><=
/DIV>
<DIV><SPAN class=3D576163906-06042001><FONT face=3DArial=20
size=3D2>------Test&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;=20
[DTML Method:&nbsp; contains the line &lt;dtml-let=20
ret=3D"xuserAuthenticate(username=3D'foo',password=3D'bar')"&gt;</FONT></=
SPAN></DIV>
<DIV><SPAN class=3D576163906-06042001><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D576163906-06042001><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D576163906-06042001><FONT face=3DArial size=3D2>If I =
try to "view"=20
Test, then&nbsp;I get the nasty traceback below.&nbsp; If I view=20
xuserAuthenticate, no such error is reported.&nbsp; I suppose this is =
because=20
dtml-let puts a "strange" acquisition context in place during the =
execution of=20
xuserAuthenticate...an execution context that does not include the =
containing=20
folder of Test (namely acl_users).&nbsp; Or is this due to some strange=20
properties that I am not yet familiar with of acl_user=20
folders?</FONT></SPAN></DIV>
<DIV><SPAN class=3D576163906-06042001><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D576163906-06042001>Traceback (innermost =
last):<BR>&nbsp; File=20
D:\CLOAKM~1\lib\python\ZPublisher\Publish.py, line 223, in=20
publish_module<BR>&nbsp; File =
D:\CLOAKM~1\lib\python\ZPublisher\Publish.py, line=20
187, in publish<BR>&nbsp; File D:\CLOAKM~1\lib\python\Zope\__init__.py, =
line=20
221, in zpublisher_exception_hook<BR>&nbsp;&nbsp;&nbsp; (Object:=20
ProviderContainer)<BR>&nbsp; File =
D:\CLOAKM~1\lib\python\ZPublisher\Publish.py,=20
line 171, in publish<BR>&nbsp; File =
D:\CLOAKM~1\lib\python\ZPublisher\mapply.py,=20
line 160, in mapply<BR>&nbsp;&nbsp;&nbsp; (Object: Testing2)<BR>&nbsp; =
File=20
D:\CLOAKM~1\lib\python\ZPublisher\Publish.py, line 112, in=20
call_object<BR>&nbsp;&nbsp;&nbsp; (Object: Testing2)<BR>&nbsp; File=20
D:\CLOAKM~1\lib\python\OFS\DTMLMethod.py, line 189, in=20
__call__<BR>&nbsp;&nbsp;&nbsp; (Object: Testing2)<BR>&nbsp; File=20
D:\CloakMail\lib\python\DocumentTemplate\DT_String.py, line 549, in=20
__call__<BR>&nbsp;&nbsp;&nbsp; (Object: Testing2)<BR>&nbsp; File=20
D:\CLOAKM~1\lib\python\DocumentTemplate\DT_Let.py, line 146, in=20
render<BR>&nbsp;&nbsp;&nbsp; (Object:=20
ret=3D"xuserAuthenticate(username=3D'foo',password=3D'bar')")<BR>&nbsp; =
File=20
D:\CLOAKM~1\lib\python\DocumentTemplate\DT_Util.py, line 334, in=20
eval<BR>&nbsp;&nbsp;&nbsp; (Object:=20
xuserAuthenticate(username=3D'foo',password=3D'bar'))<BR>&nbsp;&nbsp;&nbs=
p; (Info:=20
xuserAuthenticate)<BR>&nbsp; File &lt;string&gt;, line 0, in ?<BR>&nbsp; =
File=20
D:\CLOAKM~1\lib\python\OFS\DTMLMethod.py, line 182, in=20
__call__<BR>&nbsp;&nbsp;&nbsp; (Object: xuserAuthenticate)<BR>&nbsp; =
File=20
D:\CloakMail\lib\python\DocumentTemplate\DT_String.py, line 549, in=20
__call__<BR>&nbsp;&nbsp;&nbsp; (Object: xuserAuthenticate)<BR>&nbsp; =
File=20
D:\CLOAKM~1\lib\python\DocumentTemplate\DT_In.py, line 649, in=20
renderwob<BR>&nbsp;&nbsp;&nbsp; (Object:=20
SQL_get_password(username=3D'foo',password=3D'bar'))<BR>&nbsp; File=20
D:\CLOAKM~1\lib\python\DocumentTemplate\DT_Util.py, line 334, in=20
eval<BR>&nbsp;&nbsp;&nbsp; (Object:=20
SQL_get_password(username=3D'foo',password=3D'bar'))<BR>&nbsp;&nbsp;&nbsp=
; (Info:=20
SQL_get_password)<BR>&nbsp; File &lt;string&gt;, line 0, in =
?<BR>NameError: (see=20
above)<BR></DIV></SPAN></BODY></HTML>

------=_NextPart_000_00C4_01C0BE43.FD0D56D0--