Hi Will, That's not a problem since all three of them, gzip, cache and early model execution are executed before the template starts writing to the response (and commits it).
What i would do depends on the scope of the problem, * If its a very specific page that has this problem i would add a rendering model to the template of that page that calls request.getSession() to make sure that a session is created and a cookie gets set. * If the problem affects a lot of pages i might write a filter that calls request.getSession(), the filter would use a set of voters to limit the requests it would operate on. Another way of solving it would be to have the template dig through its content for paragraphs that will need a session and then call request.getSession(). A bit more work and it will be complicated in case of inheritance or using content from outside the page by other means. // Tobias On May 20, 2011, at 10:57 AM, Will Scheidegger wrote: > > Hi Tobias, hi Gregory > > Sorry to bother you so many times, but since I'm not sitting at a Swisscom > desk I cannot get the answers trough try&error. > > - Greg, you said that we should have the model class be executed early > (before the page starts rendering) > - Tobias, you brought the gzip (or cache) filter to my attention (where I do > believe the root cause for the problem lies) > > But the gzip (and he cache) filter is way before the modelExecution filter in > the filter chain so my guess would be that having the paragraph model execute > early would not change a thing here. Can you back this guess or am I still > missing something? > > - will > > > ---------------------------------------------------------------- > For list details see > http://www.magnolia-cms.com/home/community/mailing-lists.html > To unsubscribe, E-mail to: <[email protected]> > ---------------------------------------------------------------- ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
