----- Original Message ---- From: Thomas Waldmann <[EMAIL PROTECTED]> To: moin-user <[email protected]> Sent: Friday, November 30, 2007 5:29:18 PM Subject: Re: [Moin-user] Page Trail Length is One on 1.6.0
> On 1.6.0 beta 2, I just noticed that when I turn on the page trail, it shows only the last page. Per http://moinmo.in/MoinDev/Storage, > the page trail is not stored into user_dir, but into the user's session data on Moin 1.6. Is this for an anon user or for a logged in user? Do you see your name at the top border of modern theme? > Where is the session data stored? data/cache/session* iirc. > I am running mod_python (perhaps I spoke too soon about mod_python working OK). What auth method do you use? ---------- I am using external_cookie. The problem was in my external_cookie code, not Mod_python. I have the page trail working now, but I am not sure this is the way it was intended to work. The reason I could not see the session data was because there wasn't any. Following the example in contrib/auth_externalcookie my modified version returned the (user-object,False) when the user was authenticated and (None,True) if he was not. The False prevented the next authentication method from being called so no MOIN_SESSION cookie was created (none was needed in 1.5.8), and the page trail was not retained. To create the MOIN_SESSION cookie, I changed external_cookie to call moin_session if the cookie did not exist: from MoinMoin.auth import moin_session moin_session(request,name=auth_username,login=True,user_obj=user) Then, to get the page trail saved, I had to put moin_session first in the authentication list: auth = [moin_session,external_cookie] Reversing the above does not create a page trail. I haven't yet determined where the page trail is saved or why moin_session must be first. On subsequent calls to external_cookie, if the user is still valid (user_obj,True) is returned, if the user is not valid (None,True) is returned. The net result is login, logout, and the page trail seem to be working. One difference between 1.5.8 and 1.6.0 is that on 1.5.8, a user was able to see his page trail from the last session, even if it was a week prior. On 1.6.0 he will see it only if he logs on again before the MOIN_SESSION cookie expires. I will test a bit more and update moin master with the revised external_cookie example. Any insight into why moin_session must be before external_cookie in the auth list? Roger Haase ____________________________________________________________________________________ Be a better sports nut! Let your teams follow you with Yahoo Mobile. Try it now. http://mobile.yahoo.com/sports;_ylt=At9_qDKvtAbMuh1G1SQtBI7ntAcJ ------------------------------------------------------------------------- SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 _______________________________________________ Moin-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/moin-user
