[Zope] Zpatterns / SmartObjects

ra@burningman.com ra@burningman.com
Thu, 30 May 2002 12:39:05 -0700


Steve Spicklemire wrote:
> Hi R (a ?),
> 
> On Thursday, May 30, 2002, at 01:19  AM, ra@burningman.com wrote:
> 
>> Well, there are two major problems I've experienced.  The first is a 
>> trouble w/ VirtualHostBase, using an Apache/ProxyPass setup that works 
>> fine w/ several other 2.3.X and 2.4.X versions.  It involves an Apache 
>> VirtualHost resolving to a one-below-the-root folder in Zope which is 
>> authenticated via a LoginManager.  When I try it w/ 2.5.1, I get the 
>> login screen, but then, regardless of whether or not I authenticate 
>> correctly, I get a strange set of nested site errors.  There's one 
>> 'NotFound' error, and in the place where the error's text message 
>> should be, there's ANOTHER site error that says 'Resource Not Found'.  
>> And looking at the URL, I see that it looks like so:
>>
>> https://www.blackrockcity.org/VirtualHostBase/https/www.blackrockcity.org:443/brc/VirtualHostRoot/
>>
>> instead of merely "https://www.blackrockcity.org/".  Note that I can 
>> replace my 2.5.1 install w/ a 2.4.4 install that is identical in all 
>> other ways, and it will work.
>>
> 
> Hmmm.. is it the exact same Data.fs? It smells like you don't actually 
> *have* a VirtualHostMonster installed. I've done this on 
> 2.5.1/LoginManager with no trouble (albeit, not using 
> https/LoginManager, but I've used https with VHM many times with no 
> trouble. One issue is that it should probably be 
> http://www.backrockcity.org/VirtualHostBase/https/.... )

It's not the same Data.fs.  But there is a VHM.  My first connection 
works... If I point a browser at www.blackrockcity.org I get the 
LoginManager's login screen.  It's only when I submit my authentication 
data that I have the problem.

>> The other problem I have is that a SkinScript that is in my UserSource 
>> can't seem to find a ZSQL method that lives directly above it.  I have 
>> a method called "SQL_findMember" in the LoginManager proper (i.e. the 
>> acl_users folder).  In the "member_storage" SkinScript that is in the 
>> UserSource, I have the following line:
>>
>> WITH QUERY SQL_findMember(member_name=self.id) COMPUTE
>>     member_id, member_name, password, is_active, is_passwd_bad
>>
>> When I try to authenticate, though, it is unsuccessful, and the 
>> STUPID_ZOPE_LOG shows the following error:
>>
>> ---------------
>> 2002-05-30T06:09:28 PROBLEM(100) ZPatterns Error computing attribute 
>> member_name
>> Traceback (innermost last):
>>   File 
>> /usr/home/zope/src/zope/lib/python/Products/ZPatterns/AttributeProviders.
>> py, line 302, in _AttributeFor
>>     (Object: member_storage, line 1)
>>   File 
>> /usr/home/zope/src/zope/lib/python/Products/ZPatterns/Expressions.py, 
>> line 123, in eval
>>   File /usr/home/zope/src/zope/lib/python/DocumentTemplate/DT_Util.py, 
>> line 231, in eval
>>     (Object: SQL_findMember ( member_name = self . id  ))
>>     (Info: self)
>>   File <string>, line 2, in f
>> NameError: global name 'SQL_findMember' is not defined
>> ---------------
>>
>> Any help resolving these issues would be HUGELY appreciated.  There's 
>> so little ZPatterns discussion anymore (and generally silence on the 
>> list whenever anyone asks about it) that I had just assumed it was a 
>> wash...
> 
> 
> Hmm.. well, this is a login manager problem I've not tickled, since I've 
> been using userXXX methods defined in the UserSource rather than 
> SkinScript, thought I've used plenty of SkinScript in ZPatterns/2.5.x 
> and not seen any problems with acquisition/visibility before. I'm 
> guessing you set "member_name" as the "load by accessing" attribute? 
> Hmm.. I just tried something to test this and it seemed to work for me. 
> Are you using TransactionAgents005?

No, I'm using a very old 0.0.1.  Where do I get a more recent version? 
Searches on zope.org and google don't help me.

I'm heartened to hear that you (and others) have this working.  I'll 
start from scratch w/ recent versions and will give it another go.  If 
it all works, I'd love to package the whole kit-n-kaboodle up to help 
keep others from having to go through what I have...

-r