Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-24450

Email Renderer XObject is missing .vm template when updating extension

    XMLWordPrintable

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:

      1. Install the Latex Exporter extension (org.xwiki.contrib.latex:latex-export), with version 1.26
      2. 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}}
        
      3. 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)
      4. The email should look like the BEFORE email in the attached image
      5. Update the Latex Exporter extension to 1.26.1 (the upgrade contains a minor change, which doesn't touch the .vm file)
      6. Again, update a page, and see that the email is sent
      7. 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

      1. Restart the XWiki instance (emails render fine afterwards)

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            abrassat Brassat Alexandru
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: