|
| 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: ``` {noformat} { \ {velocity}} #template("latex/job_macros.vm") #displayJobProgressBar('', 0) { \ {/velocity}} ``` {noformat} # Update a page, and see that the email is sent with the newly created renderer ** For testing I used [fakeSMTP|https://nilhcem.com/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|https://github.com/xwiki-contrib/latex/commit/21a31cd3178c196abd5a4200a0c415fa6ec15396], 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)
!image-2026-06-03-14-39-38-792.png|width=367,height=293! |
|