Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
15.10, 18.3.0
-
None
-
None
-
Unknown
-
Description
Velocity macros which are defined in a `src/main/resources/templates/*/.vm` don't get refreshed when rendering a `XWiki.Notifications.Code.NotificationEmailRendererClass` object, and instead they are deleted.
Reproduction Steps:
- Install the Latex Exporter extension (org.xwiki.contrib.latex:latex-export), with version 1.26
- Create a page with a `XWiki.Notifications.Code.NotificationEmailRendererClass` object, for the `update` event type, and with the following HTML template:
{{velocity}} #template("latex/job_macros.vm") #displayJobProgressBar('', 0) {{/velocity}} - Update a page, and see that the email is sent with the newly created renderer
- For testing I used fakeSMTP and the `Scheduler` XWiki page to send the mail instantly (by clicking the Notifications daily mail 'Trigger' button)
- The email should look like the BEFORE email in the attached image
- Update the Latex Exporter extension to 1.26.1 (the upgrade contains a minor change, which doesn't touch the .vm file)
- Again, update a page, and see that the email is sent
- The email looks like the AFTER email in the attached image (i.e. the .vm template is not included anymore, and those macros defined in the file don't work anymore)
Expected behavior would be that the email doesn't break after the upgrade.
Workarounds
- Restart the XWiki instance (emails render fine afterwards)
