01-19-2016 08:57 AM
When sending an email by a right-click on a document (emailDocumentSend event) the text typed in the mail editor is never sent.
There is a ${content} variable in the template file. It seems that the content of this variable is not used.
We encounter this problem with a personalized email template, but also with the default configuration.
Thanks for your help,
Patrice
**The template file : emailDocument.ftl **
> $ cat my_emailDocument.ftl
> ${content}
>
> <p>[On passe ici 1]
> Vous pouvez consulter le document en suivant ce lien : <a href="${docUrl}">${htmlEscape(docTitle)}</a>
> </p>
> </p>
The notifications config file : notification-config.xml
$ cat my-notification-config.xml
<?xml version="1.0"?>
<component name="org.my.notification.service.NotificationContrib">
<...>
<extension point="notifications" target="org.nuxeo.ecm.platform.ec.notification.service.NotificationService">
<...>
<notification name="Email document"
enabled="true" availableIn="all" autoSubscribed="true"
subject="${mailSubject}"
template="my_emailDocument"
label="label.nuxeo.notifications.email.document" channel="email">
<event name="emailDocumentSend"/>
</notification>
<...>
</extension>
<extension point="templates" target="org.nuxeo.ecm.platform.ec.notification.service.NotificationService">
<...>
<template name="my_emailDocument" src="email_templates/my_emailDocument.ftl"/>
<...>
</component>
NO ADDED TEXT HERE, AT THE LOCATION OF THE VARIABLE ${content} !
> [On passe ici 1] Vous pouvez consulter le document en suivant ce lien : Test_Note_1
> Ce courriel vous a été adressé par Jean TOTOTESTEUR (toto).
01-22-2016 05:52 AM
Solution of this problem found in https://doc.nuxeo.com/display/ADMINDOC60/Hotfixes+Management+for+Nuxeo+Platform+6.0
(5.8) Variable's names have been changed : ${mailContent} instead of ${content} 😞
It's OK now. Patrice
NXP-16031 fixed a conflict between the mail subject
parameter and subject
form field . For example, if the notification subject was defined by
subject=``"[MyNuxeoApp] ${subject}"
the rendered subject did not contain the prefix MyNuxeoApp
. NXP-16031 brings disambiguation by renaming the subject
and content
form fields.
Therefore, if you have overridden the "Email document" notification or its related template emailDocument
, you have to update them to use mailSubject
and mailContent
strings instead of subject
and content
ones. Your code should look like:
Email Document notification
subject="[MyNuxeoApp] ${mailSubject}"
emailDocument template
${mailContent}
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.