<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: The ${content} variable content does not appear in messages (emailDocumentSend event)    in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/the-content-variable-content-does-not-appear-in-messages/m-p/327295#M14296</link>
    <description>&lt;P&gt;Solution of this problem found in &lt;A href="https://doc.nuxeo.com/display/ADMINDOC60/Hotfixes+Management+for+Nuxeo+Platform+6.0" target="test_blank"&gt;https://doc.nuxeo.com/display/ADMINDOC60/Hotfixes+Management+for+Nuxeo+Platform+6.0&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;(5.8) Variable's names have been changed : ${mailContent} instead of ${content}  &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;It's OK now.
Patrice&lt;/P&gt;
&lt;HR /&gt;
&lt;H3&gt;Manual Notification on a Document&lt;/H3&gt;
&lt;P&gt;&lt;A href="https://jira.nuxeo.com/browse/NXP-16031"&gt;NXP-16031&lt;/A&gt; fixed a conflict between the mail &lt;CODE&gt;subject&lt;/CODE&gt; parameter and &lt;CODE&gt;subject&lt;/CODE&gt; form field . For example, if the notification subject was defined by&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;subject=``"[MyNuxeoApp] ${subject}"&lt;/CODE&gt;
the rendered subject did not contain the prefix &lt;CODE&gt;MyNuxeoApp&lt;/CODE&gt;. &lt;A href="https://jira.nuxeo.com/browse/NXP-16031"&gt;NXP-16031&lt;/A&gt; brings disambiguation by renaming the &lt;CODE&gt;subject&lt;/CODE&gt; and &lt;CODE&gt;content&lt;/CODE&gt; form fields.&lt;/P&gt;
&lt;P&gt;Therefore, if you have overridden the "Email document" notification or its related template &lt;CODE&gt;emailDocument&lt;/CODE&gt;, you have to update them to use &lt;CODE&gt;mailSubject&lt;/CODE&gt; and &lt;CODE&gt;mailContent&lt;/CODE&gt; strings instead of &lt;CODE&gt;subject&lt;/CODE&gt; and &lt;CODE&gt;content&lt;/CODE&gt; ones. Your code should look like:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Email Document notification&lt;/STRONG&gt;
&lt;CODE&gt;subject="[MyNuxeoApp] ${mailSubject}"&lt;/CODE&gt;
&lt;STRONG&gt;emailDocument template&lt;/STRONG&gt;
&lt;CODE&gt;${mailContent} &lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 22 Jan 2016 10:52:08 GMT</pubDate>
    <dc:creator>apx25_</dc:creator>
    <dc:date>2016-01-22T10:52:08Z</dc:date>
    <item>
      <title>The ${content} variable content does not appear in messages (emailDocumentSend event)</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/the-content-variable-content-does-not-appear-in-messages/m-p/327294#M14295</link>
      <description>&lt;H3&gt;Our problem&lt;/H3&gt;
&lt;P&gt;When sending an email by a right-click on a document (emailDocumentSend event) the text typed in the mail editor is never sent.&lt;/P&gt;
&lt;P&gt;There is a ${content} variable in the template file. It seems that the content of this variable is not used.&lt;/P&gt;
&lt;P&gt;We encounter this problem with a personalized email template, but also with the default configuration.&lt;/P&gt;
&lt;P&gt;Thanks for your help,&lt;/P&gt;
&lt;P&gt;Patrice&lt;/P&gt;
&lt;HR /&gt;
&lt;H3&gt;Our config&lt;/H3&gt;
&lt;P&gt;**The template file : emailDocument.ftl **&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;gt; $ cat my_emailDocument.ftl
&amp;gt; ${content}
&amp;gt; 
&amp;gt; &amp;lt;p&amp;gt;[On passe ici 1]
&amp;gt; Vous pouvez consulter le document en suivant ce lien : &amp;lt;a href="${docUrl}"&amp;gt;${htmlEscape(docTitle)}&amp;lt;/a&amp;gt;
&amp;gt; &amp;lt;/p&amp;gt;
&amp;gt; &amp;lt;/p&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;STRONG&gt;The notifications config file : notification-config.xml&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;$ cat my-notification-config.xml
&amp;lt;?xml version="1.0"?&amp;gt;
&amp;lt;component name="org.my.notification.service.NotificationContrib"&amp;gt;
&amp;lt;...&amp;gt;
&amp;lt;extension point="notifications" target="org.nuxeo.ecm.platform.ec.notification.service.NotificationService"&amp;gt;
&amp;lt;...&amp;gt;
   &amp;lt;notification name="Email document"
                 enabled="true" availableIn="all" autoSubscribed="true"
                 subject="${mailSubject}"
                 template="my_emailDocument"
                 label="label.nuxeo.notifications.email.document" channel="email"&amp;gt;
          &amp;lt;event name="emailDocumentSend"/&amp;gt;
   &amp;lt;/notification&amp;gt;
&amp;lt;...&amp;gt;
&amp;lt;/extension&amp;gt;
&amp;lt;extension point="templates" target="org.nuxeo.ecm.platform.ec.notification.service.NotificationService"&amp;gt;
&amp;lt;...&amp;gt;
   &amp;lt;template name="my_emailDocument" src="email_templates/my_emailDocument.ftl"/&amp;gt;
&amp;lt;...&amp;gt;
&amp;lt;/component&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;H3&gt;and the resulting message sent&lt;/H3&gt;
&lt;BR /&gt; /&amp;gt;
&lt;P&gt;NO ADDED TEXT HERE, AT THE LOCATION OF THE VARIABLE ${content} !&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;gt; [On passe ici 1] Vous pouvez consulter le document en suivant ce lien : Test_Note_1 
&amp;gt; Ce courriel vous a été adressé par Jean TOTOTESTEUR (toto). 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 19 Jan 2016 13:57:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/the-content-variable-content-does-not-appear-in-messages/m-p/327294#M14295</guid>
      <dc:creator>apx25_</dc:creator>
      <dc:date>2016-01-19T13:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: The ${content} variable content does not appear in messages (emailDocumentSend event)</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/the-content-variable-content-does-not-appear-in-messages/m-p/327295#M14296</link>
      <description>&lt;P&gt;Solution of this problem found in &lt;A href="https://doc.nuxeo.com/display/ADMINDOC60/Hotfixes+Management+for+Nuxeo+Platform+6.0" target="test_blank"&gt;https://doc.nuxeo.com/display/ADMINDOC60/Hotfixes+Management+for+Nuxeo+Platform+6.0&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;(5.8) Variable's names have been changed : ${mailContent} instead of ${content}  &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;It's OK now.
Patrice&lt;/P&gt;
&lt;HR /&gt;
&lt;H3&gt;Manual Notification on a Document&lt;/H3&gt;
&lt;P&gt;&lt;A href="https://jira.nuxeo.com/browse/NXP-16031"&gt;NXP-16031&lt;/A&gt; fixed a conflict between the mail &lt;CODE&gt;subject&lt;/CODE&gt; parameter and &lt;CODE&gt;subject&lt;/CODE&gt; form field . For example, if the notification subject was defined by&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;subject=``"[MyNuxeoApp] ${subject}"&lt;/CODE&gt;
the rendered subject did not contain the prefix &lt;CODE&gt;MyNuxeoApp&lt;/CODE&gt;. &lt;A href="https://jira.nuxeo.com/browse/NXP-16031"&gt;NXP-16031&lt;/A&gt; brings disambiguation by renaming the &lt;CODE&gt;subject&lt;/CODE&gt; and &lt;CODE&gt;content&lt;/CODE&gt; form fields.&lt;/P&gt;
&lt;P&gt;Therefore, if you have overridden the "Email document" notification or its related template &lt;CODE&gt;emailDocument&lt;/CODE&gt;, you have to update them to use &lt;CODE&gt;mailSubject&lt;/CODE&gt; and &lt;CODE&gt;mailContent&lt;/CODE&gt; strings instead of &lt;CODE&gt;subject&lt;/CODE&gt; and &lt;CODE&gt;content&lt;/CODE&gt; ones. Your code should look like:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Email Document notification&lt;/STRONG&gt;
&lt;CODE&gt;subject="[MyNuxeoApp] ${mailSubject}"&lt;/CODE&gt;
&lt;STRONG&gt;emailDocument template&lt;/STRONG&gt;
&lt;CODE&gt;${mailContent} &lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2016 10:52:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/the-content-variable-content-does-not-appear-in-messages/m-p/327295#M14296</guid>
      <dc:creator>apx25_</dc:creator>
      <dc:date>2016-01-22T10:52:08Z</dc:date>
    </item>
  </channel>
</rss>

