Merge Fields inside of A tag Href do not render (V2.1.7)
Good Morning!
Noted that a similar issue had been raised earlier in 2017 but happen to have stumbled in to it myself.
Regarding mail merge attributes (Name / Email) and attempting to place them inside the href of an A tag causes whatever replace function that is within it to fail.
Using the merge tags outside of the a tag work correctly however.
By chance is there any known workaround / obvious flaw?
Ive checked to see if the Rich text editor has malformed the [email] tag and it has not, I have also checked in preview where suprisingly the previewed version of the template replaces correctly.
Regarding what I am attempting to do is the following:
I wish to place the users email address in to a query string, basically have a handler at the other end thats going to take the query string and auto populate a form field (Just to make it nicer for our end users).
In essence what is inside of the editor at the moment is simply a button with the following A tag:
<a href="http://www.website.com/emailformpage?email=[email]">Sign up here!</a>
This simply takes them back to a page on the site with a very simple contact form.
The actual outcome is I end up with a link that looks exactly like the above, instead of the [email] being replaced with the email value from the mailing list.
(PS, thanks! Completely forgot that info was in there!)
I've tracked this down now, the problem is that the "ProcessPreRender"-method of the AddClickTracking-render tasks runs before the merge fields are applied to the unique item.
The render task that replaces the merge fields does not support the URL-encoded strings that the AddClickTracking-task will created to add the click tracker.
Any way. I've updated the render task to support this now - I'll include this is an upcoming release - If you are on the latest version of Newsletter Studio and would like a hot-fix - send me an email and I'll provide it to you.
My email: markus [at sign goes here] enkelmedia.se
I have commented in another topic of 2017 but now I found this one that addresses the same problem.
I will send you an email if you could provide me that hotfix, but I would like to know what is the latest version of NewsletterStudio? 2.1.9.3?
PS: I'm using the 2.1.7.0...is there any incompatibility?
Merge Fields inside of A tag Href do not render (V2.1.7)
Good Morning!
Noted that a similar issue had been raised earlier in 2017 but happen to have stumbled in to it myself.
Regarding mail merge attributes (Name / Email) and attempting to place them inside the href of an A tag causes whatever replace function that is within it to fail.
Current config file looks like so:
Using the merge tags outside of the a tag work correctly however.
By chance is there any known workaround / obvious flaw? Ive checked to see if the Rich text editor has malformed the [email] tag and it has not, I have also checked in preview where suprisingly the previewed version of the template replaces correctly.
Any help is greatly appreciated.
Hi!
Thanks for using the package!
The "RenderTasks" that are used renders different content in preview and when the "real" message are sent, since we don't have any details about the recipient when we render the preview, please read the documentation: https://www.newsletterstudio.org/help/develop-with-newsletter-studio/control-content-with-render-tasks/
What are you trying to include in your href-tag? Could you share an example of what you are trying to do?
Also: You should editor your pasted code and remove the password that you included for your SMTP.
Hi Markus!
No worries, package has been excellent so far!
Fair enough with the Preview, hadnt realised.
Regarding what I am attempting to do is the following:
I wish to place the users email address in to a query string, basically have a handler at the other end thats going to take the query string and auto populate a form field (Just to make it nicer for our end users).
In essence what is inside of the editor at the moment is simply a button with the following A tag:
This simply takes them back to a page on the site with a very simple contact form.
The actual outcome is I end up with a link that looks exactly like the above, instead of the [email] being replaced with the email value from the mailing list.
(PS, thanks! Completely forgot that info was in there!)
Hi Tom!
Thanks for making the issue more clear!
I've tracked this down now, the problem is that the "ProcessPreRender"-method of the AddClickTracking-render tasks runs before the merge fields are applied to the unique item.
The render task that replaces the merge fields does not support the URL-encoded strings that the AddClickTracking-task will created to add the click tracker.
Any way. I've updated the render task to support this now - I'll include this is an upcoming release - If you are on the latest version of Newsletter Studio and would like a hot-fix - send me an email and I'll provide it to you.
My email: markus [at sign goes here] enkelmedia.se
Sorry for the inconvenience.
// m
Hi Markus,
I have commented in another topic of 2017 but now I found this one that addresses the same problem. I will send you an email if you could provide me that hotfix, but I would like to know what is the latest version of NewsletterStudio? 2.1.9.3?
PS: I'm using the 2.1.7.0...is there any incompatibility?
Thanks
Hi Markus,
Happy to wait for next release!
Thank you ever so much for resolving :)
is working on a reply...