[ http://jira.magnolia.info/browse/MAGNOLIA-2387?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Philipp Bracher updated MAGNOLIA-2387: -------------------------------------- Summary: Request stored in WebContext is not updated after a forward/includes (was: Request stored in WebContext is not updated after a forward) Fix Version/s: 3.7 (was: 3.6.x) The issue is even more complex: we don't update the context on includes. To solve that we would have to execute the filter chain on includes too but only execute the context filter then. I am not sure but some of the issues might be related to that fact: * MGNLWLS-8 * MAGNOLIA-2395 > Request stored in WebContext is not updated after a forward/includes > -------------------------------------------------------------------- > > Key: MAGNOLIA-2387 > URL: http://jira.magnolia.info/browse/MAGNOLIA-2387 > Project: Magnolia > Issue Type: Bug > Components: core > Affects Versions: 3.6.1 > Reporter: Fabrizio Giustina > Assignee: Fabrizio Giustina > Fix For: 3.7 > > > The request stored in WebContext by the ContextFilter is never updated, and > may miss parameters added by a forward. > For example, using a virtualUri filter in order to forward from > /test/param.html to test..html?x=param I get different results when I do: > request.getParam("x") --> "param" > ((WebContext) MgnlContext.getInstance()).getRequest().getParam("x") --> null > this also means that paragraphs never see parameters added by a forward, > since the paragraph renderer gets the request from the context. Looks like a > regression from 3.5, since I was using this kind of forwards and they stopped > working after upgrading to 3.6 (not sure about which change in the filters > has caused this). > I would propose to fix it by updating the request stored in WebContext any > time ContextFilter processes the request. A good fix, without modifying in > any way the WebContext interface, is doing something like the following: > {noformat} > if (!MgnlContext.hasInstance() || MgnlContext.isSystemInstance()) > { > MgnlContext.initAsWebContext(request, response, servletContext); > contextSet = true; > } > + else > + { > + // update request > + WebContext webContext = (WebContext) MgnlContext.getInstance(); > + webContext.init(request, response, servletContext); > + } > + > {noformat} > I would like to commit this to 3.6.2, this can be a very annoying bug for > anyone using forwards with parameters. Any objection? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.magnolia.info/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ---------------------------------------------------------------- for list details see http://documentation.magnolia.info/ ----------------------------------------------------------------