[Moin-user] Page Trail Length is One on 1.6.0

Roger Haase crosseyedpenguin at yahoo.com
Sat Dec 1 13:02:22 EST 2007

----- Original Message ----
From: Thomas Waldmann <tw-public at gmx.de>
To: moin-user <moin-user at lists.sourceforge.net>
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

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

More information about the Moin-user mailing list