[Zope] FSSession buglette

Paul Gresham gresham@mediavisual.com
Fri, 07 Jul 2000 12:23:07 +0800


Hi All,
I had some real problems with FSSession tonight. The first problem was
when the FSSession tried to load, it would get an error along the lines
of failed to import Acquisition. Next step was when the user session
tried to rename and the file wasn't there. This threw in error in a Zope
commit transaction, and rendered the site useless until a restart was
performed (this was correct action by Zope, i.e. all commits are blocked
to avoid the database becoming more screwed after a commit fails).

First thing I did was put a try around the dump to stop it from throwing
an error if the file doesn't exist. This is certainly a preferred option
for us, as it does not affect the function of the FSSession at all
(Except that one session is obviously now duff).

Second thing in tracking down the culprit, I finally figured out that
what I was doing was quite naughty. Basically creating an option for the
user to return to the site and have his/her name already entered into
the login screen. The mistake was putting AUTHENTICATED_USER into
FSSession, it basically tried to store the object, when all I wanted was
the string username! Oops!

Regards
Gresh