|
hello!
ken, I got your brunch, installed the latest membrane, installed your remember, installed a basic product to use both and got the same error when I tried to create a new custom member:
AttributeError: 'NoneType' object has no attribute 'getProperty'
I need to get this working, so I am going to see what I can fix.
<index name="exact_getUserName" meta_type="FieldIndex"><indexed_attr value="getUserName"/></index><index name="getUserId" meta_type="ZCTextIndex"><indexed_attr value="getUserId"/><extra name="index_type" value="Cosine Measure"/><extra name="lexicon_id" value="lexicon"/></index><index name="exact_getGroupId" meta_type="FieldIndex"><indexed_attr value="getGroupId"/></index>
secondly, i've resumed working on this and the problem is clearly connected with the membrane tool's catalog of the member objects. in both the 2.0 membrane version and the prior one the tool's catalog is configured (Products/membrane/profiles/default/membrane_tool.xml) with FieldIndexes that duplicate getUserid, getUserName, and get getGroupId to be used for exact lookups on those values:
<index name="exact_getUserName" meta_type="FieldIndex">the problem is that running with the latest versions of membrane and remember the exact_getUserId is not getting into the membrane tool's member catalog entries, yet the exact_getUserName value is.
<indexed_attr value="getUserName"/>
</index>
<index name="getUserId" meta_type="ZCTextIndex">
<indexed_attr value="getUserId"/>
<extra name="index_type" value="Cosine Measure"/>
<extra name="lexicon_id" value="lexicon"/>
</index>
<index name="exact_getGroupId" meta_type="FieldIndex">
<indexed_attr value="getGroupId"/>
</index>
|
-- |
|
|
Em Sáb, 2010-10-09 às 11:09 -0400, ken manheimer escreveu:Yea, i saw that happening...
secondly, i've resumed working on this and the problem is clearly connected with the membrane tool's catalog of the member objects. in both the 2.0 membrane version and the prior one the tool's catalog is configured (Products/membrane/profiles/default/membrane_tool.xml) with FieldIndexes that duplicate getUserid, getUserName, and get getGroupId to be used for exact lookups on those values:
<index name="exact_getUserName" meta_type="FieldIndex">the problem is that running with the latest versions of membrane and remember the exact_getUserId is not getting into the membrane tool's member catalog entries, yet the exact_getUserName value is.
<indexed_attr value="getUserName"/>
</index>
<index name="getUserId" meta_type="ZCTextIndex">
<indexed_attr value="getUserId"/>
<extra name="index_type" value="Cosine Measure"/>
<extra name="lexicon_id" value="lexicon"/>
</index>
<index name="exact_getGroupId" meta_type="FieldIndex">
<indexed_attr value="getGroupId"/>
</index>
I don't know how you saw that, but to see in the ZMI I commit the transaction on the middle of a pdb:
(Pdb) import transaction transaction.commit()
I think that it is not very good approach :) .
bin/client2 fg
How membrane interacts with portal_membership? How it is suppose to tell to portal_membership that it needs to use the membrane_tool data?
Where membrane update its catalog when creating a new user?
--
Felipe Roquette
felipe@krei.com.br
www.krei.com.br
+55 11 3431.0303![]()
.
--
Archive: http://www.coactivate.org/[…]/1286644145164
To unsubscribe send an email with subject "unsubscribe" to reme...@lists.coactivate.org. Please contact remember...@lists.coactivate.org for questions.
a variety of ways, but the main one is to run my client in the foreground:
bin/client2 fgi then try to register a client. (my zeo client2 is built with some debugging add-ons, but they're not
I also noted that remember was always overriding the @@usergroup-userprefs, even if it was uninstalled (not actived).
To correct this behavior I added a browser layer to remember.
Can I upload this? Or sent to someone?
my next task is to identify where the catalog implements the FieldIndex "indexed_attr value=", so i could try to determine what's missing or disrupting the process. any ideas about what could be causing this problem, and/or other ways to zero in on it, are welcome.
|
-- |
|
|
send me the diffs, if you can. if it's not too elaborate, i can include it on my branch, in which i'm hoping to have a fix for the cataloging problem, the updated authentication and other adjustments for use with membrane 2, the login-with-email fix from another branch, and miscellaneous other things. i'm going to be away for part of most of this week, so i won't have time to include it immediately, but will do so soon after i return.
(i also noticed that remember does not cleanly uninstall, and even regular installation adversely affects portals in the same zope instance. i'm not sure about that, but i do know that uninstalling remember fouls things up so you can't reinstall it. i don't think i'm going to be able to look into that any time soon, but would love to see it addressed...)
|
-- |
|
|
Em Sáb, 2010-10-09 às 11:09 -0400, ken manheimer escreveu:
my next task is to identify where the catalog implements the FieldIndex "indexed_attr value=", so i could try to determine what's missing or disrupting the process. any ideas about what could be causing this problem, and/or other ways to zero in on it, are welcome.What should be the difference between "getId", "getUserId" and "getUserName"?
I saw that "getUserName" is defined at content/member.py but there is no 'def getUserId' so I added:
def getUserId(self):
"""Return the id of the user.
"""
return self.getId()
It seems that it is now working.
This method should be called here content/useridprovider.py , but I don't know it does not work there.
Now I am getting another error... for the pwreset_action.
.getUserId() is required by the IMembraneUserObject interface, which (among others) the remember member is supposed to be implementing. i guess the catalog omitted the field because the method was missing, and i didn't notice that.
the user manager (probably one of the provisions for the PAS authentication machinery) .doChangeUser() looks for something that provides IMembraneUserChanger for the user. in the old, working remember version, it would find the right adapter, RememberUserChanger.doChangeUser(), from content/rememberuserchanger.py. in the new version, it's eventually finding the user / member object and trying to invoke .doChangeUser on that - and it doesn't have that method.
since it doesn't have that method, the remember object shouldn't be claiming to be implement IRememberUserChanger, so i'm removing that definition. now the adapter in RememberUserChanger is being found, and the password is successfully changed. (i'm not sure why the old version worked - the memer object there also claimed to implement IRememberUserChanger. perhaps it wound up later in sequence in the search results, so never got used?) anyway, i've checked in this change, too.
there's more work to do. for one thing, the refactored authentication scheme, with .authenticateCredentials() in the remember object, is not working right - logins work, but disabling membership isn't disabling the ability to log in. i'll look at that, hopefully before i'm travelling, but if not, then the week after.
thanks much for your help - i'd been looking at the problem for a while without noticing the missing getUserId() method. it's great to be unstuck from that!
|
Best regards, |
|
|
Em Dom, 2010-10-10 às 00:03 -0400, ken manheimer escreveu:I think that the catalog should warned us about this.
.getUserId() is required by the IMembraneUserObject interface, which (among others) the remember member is supposed to be implementing. i guess the catalog omitted the field because the method was missing, and i didn't notice that.
great!the user manager (probably one of the provisions for the PAS authentication machinery) .doChangeUser() looks for something that provides IMembraneUserChanger for the user. in the old, working remember version, it would find the right adapter, RememberUserChanger.doChangeUser(), from content/rememberuserchanger.py. in the new version, it's eventually finding the user / member object and trying to invoke .doChangeUser on that - and it doesn't have that method.
since it doesn't have that method, the remember object shouldn't be claiming to be implement IRememberUserChanger, so i'm removing that definition. now the adapter in RememberUserChanger is being found, and the password is successfully changed. (i'm not sure why the old version worked - the memer object there also claimed to implement IRememberUserChanger. perhaps it wound up later in sequence in the search results, so never got used?) anyway, i've checked in this change, too.
I was trying to solve this without success.
i realized i was mistaken about fixing the pwreset_form problem - it's not yet settled.
|
-- |
|
there's more work to do. for one thing, the refactored authentication scheme, with .authenticateCredentials() in the remember object, is not working right - logins work, but disabling membership isn't disabling the ability to log in. i'll look at that, hopefully before i'm travelling, but if not, then the week after.
|
|
|
|
Em Dom, 2010-10-10 às 00:03 -0400, ken manheimer escreveu:
there's more work to do. for one thing, the refactored authentication scheme, with .authenticateCredentials() in the remember object, is not working right - logins work, but disabling membership isn't disabling the ability to log in. i'll look at that, hopefully before i'm travelling, but if not, then the week after.
I think the problem is that authenticateCredentials() from remember is never called.
Membrane is calling authenticateCredentials from Products/membrane/at/authentication.py
--
Archive: http://www.coactivate.org/[…]/1286816369248
To unsubscribe send an email with subject "unsubscribe" to reme...@lists.coactivate.org. Please contact remember...@lists.coactivate.org for questions.
right - as with the pwreset_form problem, the issue is having the right things found according to interface lookup. we have to work that out for .authenticateCredentials() and the pwreset_form - it was working for IRememberUserChanger to derive from IMembraneUserChanger in the prior version, i think we need to find why it's not working wiht that arrangement in the new version. i hope to get to this later today, or maybe tomorrow, not sure i'll find the time...
|
-- |
|
Em Seg, 2010-10-11 às 13:07 -0400, ken manheimer escreveu:I think that remember is somehow confusing... because there a places it adapts something, in other places it directly implements... it seems that remember is not so organized as membrane.
right - as with the pwreset_form problem, the issue is having the right things found according to interface lookup. we have to work that out for .authenticateCredentials() and the pwreset_form - it was working for IRememberUserChanger to derive from IMembraneUserChanger in the prior version, i think we need to find why it's not working wiht that arrangement in the new version. i hope to get to this later today, or maybe tomorrow, not sure i'll find the time...
As for now, it's probably easier to get a new reliable custom member using only membrane as using remember.
ken, what do you think?
--
Felipe Roquette
felipe@krei.com.br
www.krei.com.br
+55 11 3431.0303![]()
.
--
Archive: http://www.coactivate.org/[…]/1286829823580
To unsubscribe send an email with subject "unsubscribe" to reme...@lists.coactivate.org. Please contact remember...@lists.coactivate.org for questions.
I'd second this and also add to this that a lot of sites out 'in the
wild' use Remember so it is worth anyones while keeping it maintained
and working.
-Tim
>
> --
> Felipe Roquette
> fel...@krei.com.br
>
> www.krei.com.br
> +55 11 3431.0303
>
>
> .
>
>
> --
> Archive: http://www.coactivate.org/[…]/1286829823580
>
> To unsubscribe send an email with subject "unsubscribe" to
> reme...@lists.coactivate.org. Please contact
> remember...@lists.coactivate.org for questions.
> --
> ken
> http://myriadicity.net
>
>
>
> --
> Archive: http://www.coactivate.org/[…]/1286830439490
> To unsubscribe send an email with subject "unsubscribe" to
> reme...@lists.coactivate.org. Please contact
> remember...@lists.coactivate.org for questions.
>
--
Archive: http://www.coactivate.org/projects/remember/lists/remember/archive/2010/10/1286862113788
(the changes are not exactly what i would expect is necessary to get things working, so i'm not completely comfortable with them, but i wanted to get them out there for people to exercise, and possibly explain - wichert, ross?)
one problem that i know is still pending is making a member's login inhibited when their membership is disabled. that may be part of fixing the implementation of the .authenticateCredentials() method in the remember object - i have the rough code in place, but only now am to the point of using and resolving it. i'll be away for several days, and will be working on it when i return.
|
-- |
|
incorporating what felipe found, i've checked into my remember branch further adjustments to accommodate wichert's membrane2 changes, so that the password reset form now works. it's now possible to for remember-based members to register/be registered, set and reset their password, and log in.
(the changes are not exactly what i would expect is necessary to get things working, so i'm not completely comfortable with them, but i wanted to get them out there for people to exercise, and possibly explain - wichert, ross?)
one problem that i know is still pending is making a member's login inhibited when their membership is disabled. that may be part of fixing the implementation of the .authenticateCredentials() method in the remember object - i have the rough code in place, but only now am to the point of using and resolving it. i'll be away for several days, and will be working on it when i return.
On Mon, Oct 11, 2010 at 1:07 PM, ken manheimer <ken.ma...@gmail.com> wrote:
On Mon, Oct 11, 2010 at 12:54 PM, Felipe Roquette <fel...@krei.com.br> wrote:Em Dom, 2010-10-10 às 00:03 -0400, ken manheimer escreveu:there's more work to do. for one thing, the refactored authentication scheme, with .authenticateCredentials() in the remember object, is not working right - logins work, but disabling membership isn't disabling the ability to log in. i'll look at that, hopefully before i'm travelling, but if not, then the week after.
I think the problem is that authenticateCredentials() from remember is never called.
Membrane is calling authenticateCredentials from Products/membrane/at/authentication.py
right - as with the pwreset_form problem, the issue is having the right things found according to interface lookup. we have to work that out for .authenticateCredentials() and the pwreset_form - it was working for IRememberUserChanger to derive from IMembraneUserChanger in the prior version, i think we need to find why it's not working wiht that arrangement in the new version. i hope to get to this later today, or maybe tomorrow, not sure i'll find the time...
Felipe Roquette
felipe@krei.com.br
www.krei.com.br
+55 11 3431.0303.
To unsubscribe send an email with subject "unsubscribe" to reme...@lists.coactivate.org. Please contact remember...@lists.coactivate.org for questions.
--
ken
http://myriadicity.net