Hello,
after updating Confluence from 7.19.16 to 7.19.17 VelocityUtils.getRenderedTemplate() returns empty String .
This means my macros are just an empty string.
The example below shows a quick fix:
@Scanned
public class MyLink extends ... {
...
public String execute(Map<String, String> map, String s,
ConversionContext conversionContext)
throws MacroExecutionException {
...
...
...
/* This won't work any more:
return VelocityUtils.getRenderedTemplate(TMPL_LINK,context);
*/
// Temporary workarround:
String result = TMPL_LINK_HTML.
replaceAll("Lfullid", context.getOrDefault("fullid","").toString()).
replaceAll("Lid", context.getOrDefault("id","").toString());
return result;
}
}
- TMPL_LINK was the path to the template:
- templates/LabelLink.html
- TMPL_LINK_HTML is the content of LabelLink.html (${id} and ${fullid} was replaced by Lid and Lfullid)
What has changed? How can I make getRenderedTemplate() work again?
BR,
Rainer