mailtrain icon indicating copy to clipboard operation
mailtrain copied to clipboard

Error sending campaing when merge tag is a number

Open ganeshkrishnan1 opened this issue 4 years ago • 3 comments

I created a new Field with Integer value [MERGE_MONTH]

If I use this field in the email template, it fails with value.replace is not a function.

I tried to debug this a bit and it looks like it fails at this place let searchVal = '%' + params.search.value.replace(/\\/g, '\\\\').replace(/([%_])/g, '\\$1') + '%';

here params.search.value doesnt seem to be a string and hence there is no replace function to it.

ganeshkrishnan1 avatar Mar 01 '21 04:03 ganeshkrishnan1

Is this v1 or v2? If it's v2, could you post exact steps how to replicate the issue, a screenshot and the exact file and line number where it fails? Thanks.

bures avatar May 26 '21 05:05 bures

It's version 2. The exact bug is in the line above: when params.search.value is integer it doesnt have replace function (like string does)

replicate by creating a number tag and then using it in a template.

ganeshkrishnan1 avatar May 29 '21 19:05 ganeshkrishnan1

Same here, seems a duplicate of #809

davidwindell avatar May 10 '22 13:05 davidwindell

We are going to start with the development and testing of mailtrain v3 in the next weeks.

You are welcome to help us with the testing as soon as the first release candidate is available.

forge0ne avatar Mar 16 '24 09:03 forge0ne

If you have modules/tasks that needs help you can create tickets and I can put some of our team members to volunteer time

ganeshkrishnan1 avatar Mar 16 '24 16:03 ganeshkrishnan1