[Zope-dev] EMarket and 2.2.0b3

R. David Murray bitz@bitdance.com
Sat, 1 Jul 2000 14:37:34 -0400 (EDT)


On Sat, 1 Jul 2000, Adam Karpierz wrote:
> In installation of Zope Emarket and eTailer both installed
> and works ok on current 2.2.0 CVS.

Well, they may work OK, but there's still a problem.

> Then you should update some files from current CVS.

I did a full current CVS checkout, and if I access '/manage_main' I still
don't get prompted for a password.  Can you check to see if that happens
for you, as well?  Remember, call that URL as the first thing you do
in the browser session.  You ought to get prompted for a manager login,
but in my case I just get to see the directory listing, as if it
were viewable by Anonymous.

> In original version of 2.2.0b3 Emarket and eTailer even dont install
> correctly in my testing box (Win98).

Funny, I didn't have any install problems with b3.

Before I tried the CVS thing, I did some tracing under b3.  I'm
beyond my Zope Zen level here, so maybe someone else can point me
in the right direction to follow up on what I've found.  What I
did was to run Zope under debug and simply trace the execution of
publishing the URL "/manage_main" both with and without EMarket
installed.  I then diffed the results and looked at the place where
the execution path diverges.  It happens at line 369 of BaseRequest.py,
in the traverse function:

r = getattr(subobject, '__roles__', UNSPECIFIED_ROLES)

When EMarket is not installed, the next thing that happens is a
call to __of__ in PermissionRole.py.  This returns ('Manager',),
and so the page is protected.  If EMarket is installed, execution
continues immediately with line 370 of BaseRequest.py, making r
UNSPECIFIED_ROLES, and so I guess the page is not protected.
Given my limited understanding of what __of__ represents, I presume
this means that somehow the management method has become unwrapped
from its aquisition context after EMarket is installed?  But even
if I'm right about that I don't know where to go from here in
tracking down how it happens.  I tried to set a breakpoint at line
169 so I could inspect the object being manipulated, but I can't
seem to get the debugger to stop at that line.  I hit 'c' and it
just displays the page (or error message, depending on whether or
not EMarket is installed).

Can anyone point me in a useful direction?  Do I need to study the
aquisition module source code next?  Or suggest what I might be
doing wrong in setting the breakpoint in the debugger (I just do
'b ZPublisher/BaseRequest.py:169' and it *seems* happy with it...)

--RDM