[ http://jira.magnolia.info/browse/MAGNOLIA-2395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18337#action_18337 ]
Philipp Bracher commented on MAGNOLIA-2395: ------------------------------------------- Hm, while I worked on the renderers I noted that the jsp paragraphs are not renderer and so have been able to fix it by flushing the output stream in the render method of the paragraph renderer. So the issue might be fixed now. > Usage of tags in freemarker paragraphs : workaround or patch freemarker ? > -------------------------------------------------------------------------- > > Key: MAGNOLIA-2395 > URL: http://jira.magnolia.info/browse/MAGNOLIA-2395 > Project: Magnolia > Issue Type: Bug > Components: core, templating > Affects Versions: 3.7 > Reporter: Gregory Joseph > Assignee: Gregory Joseph > Fix For: 3.7 > > > I encountered a bug when using tags (of the Tag sort, SimpleTags work fine) > in paragraph templates. Somehow the writer of the pageContext gets lost, and > freemarker does not like it: from {{TagTransformModel}}: {code} > if(out instanceof JspWriter) { > if(out != pageContext.getOut()) { > throw new TemplateModelException( > "out != pageContext.getOut(). Out is " + > out + " pageContext.getOut() is " + > pageContext.getOut()); > } > usesAdapter = false; > } else { > out = new JspWriterAdapter(out); > // etc... > {code} > There are multiple approaches: > * currently, the include tag passes the pageContext.getOut to the paragraph > renderer. This trigger the if block above. Include tag could wrap the > JspWriter in a regular writer. This is how I fixed it with r18328 > * fixing freemarker by omiting this if block - I'll contact the developers to > try and understand what the reasoning is > * figure out a way to not loose the pageContext/writer when rendering > paragraphs. I'm pretty unsure how that happens as of now. -- 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/ ----------------------------------------------------------------