Cannot reproduce <mail:subject> does not work inside a macro

Xon

Well-known member
Affected version
2.0.2
When using email templates, you can't set the mail's subject from inside a macro. It just silently fails rather than give an error or work.
 
Hmm, are you sure? My test case seems to work.

I edited email:watched_forum_reply and replaced the subject tags with:
HTML:
<xf:macro template="thread_forum_macros" name="subject" arg-thread="{$thread}" />
Then I edited email:thread_forum_macros and added:
HTML:
<xf:macro name="subject" arg-thread="!">
   <mail:subject>
      {{ phrase('reply_to_watched_thread_x', {
         'title': prefix('thread', $thread, 'escaped') . $thread.title
      }) }}
   </mail:subject>
</xf:macro>
And the email was sent and the subject was displayed correctly.
 
Ok, I'm not sure what happened then. I went for a while where it wasn't rendering the subject. I just tested it then, and it worked.
 
Top Bottom