2011/9/13 Dennis Schetinin <chaetal(a)gmail.com>om>:
Hi!
I've loaded Seaside 3.1 and Pier2 using Lukas Renggli's scripts
[
https://github.com/renggli/builder/blob/master/scripts]. Now it complains
(even for the root page) that WAApplication (again?) has no
#hasCookieInContext. Is Pier2 supposed to work with 3.1? What's the best way
to fix it if possible? TIA
First, thanks for loading and testing Seaside 3.1. Seaside 3.1
contains a few breaking changes [1] and one is when it comes to
cookies.
A direct translation would look like this:
(self application trackingStrategy isKindOf: WACookieSessionTrackingStrategy)
and: [
(self application trackingStrategy
cookieFromContext: self requestContext
ifAbsent: [ nil ]) notNil ]
However if the browser supports cookies and has a session cookie then
it should never be in the URL so removing it seems not needed. In
addition my understanding is when a command #isRestful then it should
not use #callback:s so there shouldn't be callback id in the URL
either. A quick glance seems to confirm this mostly, PRSearchView is
the only that answers #isRestful with true (send by #PRViewCommand)
but also uses #callback: when rendering. This seems to be a bug.
Long story short I think #purgeSeasideFields should not remove the
session id and callback id. If the browser supports cookies and has a
cookie it will not be there, otherwise it will be there and has to be
there. This should also work in Seaside 3.0.
[1]
http://code.google.com/p/seaside/wiki/Seaside310Changelog
Cheers
Philippe