Troubleshooting session states in Movable Type 4

| Comment
So I am running one install of Movable Type Pro (at the moment version 4.23-en with the Community Pack 1.61 and Professional Pack 1.21) but I am using this install for several projects (or trying to!). 

On a new site I am developing, I had the issue of being forgotten from page to page when logged in - or seemingly forgotten. When I would navigate within the site the sign in area at the top left would tell me "Sign In" (even though I already had) - if I clicked on "Sign In", I did become "Signed In" without actually having to go back to a log in screen.

I posted about this issue here on the MT forums, and with a hint from Rob I was able to see that in fact the cookie was not being set correctly. Then something funny happened - I clicked on a "tag" of the new site, which performs a search, and I was magically logged in again. Aha - I checked out the search template and saw that in the head of the template there is some javascript:

<script type="text/javascript"> /* <![CDATA[ */ var user = <$mt:UserSessionState$>; /* ]]> */ </script>

I added this code to the Header template module right after the open HEAD tag, and now everything seems to be working. I still have some extraneous code issues, but if you were having the same sessions issue as me, this code does seem to work.

comments powered by Disqus  

Enter your email address:

Delivered by FeedBurner