AnsweredAssumed Answered

Freemarker: url root object not recognized in email template

Question asked by jdbrown on Sep 6, 2007
Latest reply on Sep 11, 2007 by kevinr
According to http://wiki.alfresco.com/wiki/Template_Guide, Alfresco 2.1 now allows one to use the ${url.context} in a template. 

This does work when the template is used within a Web Script, but when I place this in an email template, I receive the error message that the keyword "url" is not recognized.

I am using the latest enterprise 2.1 branch as of last night.

The error stack is below:

Caused by: 
org.alfresco.service.cmr.repository.TemplateException: Error during processing of the template 'Expression url is undefined on line 3, column 15 in workspace://SpacesStore/02712887-5b00-11dc-bb84-edd42d997725.'. Please contact your system administrator.
   at org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:204)
   at org.alfresco.repo.processor.TemplateServiceImpl.processTemplate(TemplateServiceImpl.java:181)
   at org.alfresco.repo.processor.TemplateServiceImpl.processTemplate(TemplateServiceImpl.java:200)
   at org.alfresco.repo.action.executer.MailActionExecuter$1.prepare(MailActionExecuter.java:310)
   at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:347)
   at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:339)
   at org.alfresco.repo.action.executer.MailActionExecuter.executeImpl(MailActionExecuter.java:336)
   at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:120)
   at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:537)

EDIT: I opened issue: http://issues.alfresco.com/browse/AWC-1565

Outcomes