[
http://jira.magnolia.info/browse/MAGNOLIA-2395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18195#action_18195
]
Gregory Joseph commented on MAGNOLIA-2395:
------------------------------------------
Ok, revision 18328 definitely isn't the right choice, it JSPs aren't rendered
any more :D
> 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/
----------------------------------------------------------------