Empty fields' template variables in "To:" header are replaced by the template variable name #172

Open
elbaby opened this Issue Jul 28, 2011 · 0 comments

Projects

None yet

1 participant

@elbaby
elbaby commented Jul 28, 2011

I want to use field template variables in the "To:" header, so I put:

<!-- tmpl_var subscriber.first_name --> <!-- tmpl_var subscriber.last_name -->

However, since I just imported my addresses from an old (field-less) dada release, most of the addresses don't have values in those fields.

I did create all the entries in the dada_profile_fields table, but the first_name, last_name fields were null.

When I sent a message, the actual To: header I got looked like this:

To: "<!-- tmpl_var subscriber.first_name --> <!-- tmpl_var subscriber.last_name -->" <address@example.net>

When I expected something like this:

To: <address@example.net>

or like this:

To: " " <address@example.net>

In the few addresses that had the fields filled in, the result was OK:

To: "First Last" <other_address@example.net>

Anyway, I thought there might've been some problem with the NULL values in the database, so I manually run a couple of updates to replace NULL's with empty strings.

I got the exact same result.

I did one more try, by updating the values with one blank character strings to no avail. I always got the awful header:

To: "<!-- tmpl_var subscriber.first_name --> <!-- tmpl_var subscriber.last_name -->" <address@example.net>

I'm using Pro Dada 4.5.2 Stable.

Aside from the workarounds proposed in http://dadamailproject.com/cgi-bin/dada/mail.cgi/archive/dadadev/20110728001005/ it'd be nice to have this fixed (and NULL values should be treated as empty strings).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment