Re: [Zope] losing random session data

2007-03-18 Thread Maciej Wisniowski
> my data ends up looking like this:
> 
> order [{}, {}, {'foo': '1', 'bar': 'a'}, {}, {'foo': '2', 'bar': 'b'},
> {'foo': '6', 'bar': 'z'}, {'foo': '1', 'bar': 'a'}]
What is wrong here? I mean what output is expected?

> I've seen  http://mail.zope.org/pipermail/zope-dev/2006-July/027890.html
> and am aware that related bug existed prior to 2.7.1.
There is 'faster' that is alternative sessioning machinery but I don't know
if it works with 2.7

> I've used sessions without problems before, this is the first time I
> attempt to store variables in containers. What am I doing wrong?
Maybe it is because of req.form assignment. Try to create copy of
its values and append this to 'order' list like:

session = context.REQUEST.SESSION
order = session.get('order', [])
order.append({'foo':req.form['foo'],
  'bar':req.form['bar']})
session.set('order',order)

and see what happens now.

-- 
Maciej Wisniowski
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] losing random session data

2007-03-18 Thread Andreas Jung



--On 18. März 2007 16:22:29 -0400 Norbert Marrale <[EMAIL PROTECTED]> 
wrote:



In Zope 2.7.5-final, python 2.3.5, freebsd6 with Transient Object
Container settings:
Data timeout: 20
Timeout resolution: 20
Maximum subobjects: 1000



Zope 2.7 is completely outdated and unsupported. Consider upgrading.

-aj

pgp30kyoNabWP.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )