strapi-plugin-email-designer icon indicating copy to clipboard operation
strapi-plugin-email-designer copied to clipboard

The `mergeTags` feature doesn't work anymore

Open haZya opened this issue 8 months ago • 1 comments

Bug report

Describe the bug

mergeTags feature doesn't work anymore after the update that changes the template literal to mustache. It may be related to #133. Currently all the mergeTags are rendered empty in the emails. The variables are replaced correctly in the editor, however, once the email is sent, it is empty. This only happens to the variables declared in the mergeTags in the plugin options and not the ones that are passed to the .sendTemplatedEmail() function.

Steps to reproduce the behavior

Declare some mergeTags in the plugin options**

module.exports = ({ env }) => ({
  // ...
   "email-designer": {
    config: {
      editor: {
        options: {
          mergeTags: [
            {
              name: "Value1",
              value: "{{ VALUE1 }}",
              sample: "VALUE1",
            },
          ],
        },
      },
    },
  },
  // ...
});

Expected behavior

Correctly display the values from mergeTags.

Screenshots

Correctly parsed in the editor.

image

Empty in the actual email received.

image

System

  • Node.js version: 20.9.0
  • NPM version: 10.1.0
  • Strapi version: 4.24.2
  • Plugin version: 2.2.1
  • Database: Postgres
  • Operating system: Windows 11

haZya avatar Jun 11 '24 11:06 haZya