Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Tom Chance 20 posts 101 karma points
    May 21, 2018 @ 10:21
    Tom Chance

    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:

    <?xml version="1.0" encoding="utf-8"?>
    <newsletterStudio senderDefaultName=""
       senderDefaultEmail="" senderDefaultSettingsForced="false"
       unsubscribeConfirmUrl="" tinyMCEDataTypeId="1670" sendFailuresBeforeUnsubscribingSubscriber="4"
       settingsOnlyForAdmins="false" allowUseOfSendOutPropertyEditorWithoutApplicationAccess="true"
       forceUnsubscribeFooter="true" activateCustomDataCollection="true"
       activateCssInliner="false" enableGoogleAnalyticsTracking="false"
       googleAnalyticsMedium="email" allowedTemplatesForRenderUrl=""
       googleAnalyticsSource="NewsletterStudio" googleAnalyticsName=""
       googleAnalyticsContent="" lastInstalledVersion="2.1.7">
       <outgoingEmail sendConnectionTestEmailsTo=""
          throttlingEnabled="false" throttlingMessagesPerBatch="100"
          throttlingSecondsBetweenBatches="0" messagesBeforeJumpingToNextServer="250">
             <clear />
             <add name="" host=""
                port="587" username="********" password="**********"
                enableSsl="false" />
       <bounceManagement enabled="false" email="" host="" port="0" username=""
          password="" />
          <clear />
          <task name="AddTrackingPixelRenderTask" type="NewsletterStudio.Services.RenderTasks.Tasks.AddTrackingPixelRenderTask, NewsletterStudio" />
          <task name="FitIntoTemplateRenderTask" type="NewsletterStudio.Services.RenderTasks.Tasks.FitIntoTemplateRenderTask, NewsletterStudio" />
          <task name="RenderUrlRenderTask" type="NewsletterStudio.Services.RenderTasks.Tasks.RenderUrlRenderTask, NewsletterStudio" />
          <task name="ReplaceUnsubscribeRenderTask" type="NewsletterStudio.Services.RenderTasks.Tasks.ReplaceUnsubscribeRenderTask, NewsletterStudio" />
          <task name="ReadOnlineRenderTask" type="NewsletterStudio.Services.RenderTasks.Tasks.ReadOnlineRenderTask, NewsletterStudio" />
          <task name="ReplaceLocalLinksRenderTask" type="NewsletterStudio.Services.RenderTasks.Tasks.ReplaceLocalLinksRenderTask, NewsletterStudio" />
          <task name="AddFullDomainToRelativeSrcsRenderTask" type="NewsletterStudio.Services.RenderTasks.Tasks.AddFullDomainToRelativeSrcsRenderTask, NewsletterStudio" />
          <task name="ReplaceRelativeLinksRenderTask" type="NewsletterStudio.Services.RenderTasks.Tasks.ReplaceRelativeLinksRenderTask, NewsletterStudio" />
          <task name="GoogleAnalyticsRenderTask" type="NewsletterStudio.Services.RenderTasks.Tasks.GoogleAnalyticsRenderTask, NewsletterStudio" />
          <task name="AddClickTagsRenderTask" type="NewsletterStudio.Services.RenderTasks.Tasks.AddClickTagsRenderTask, NewsletterStudio" />
          <task name="ReplaceUniqMergeFieldsRenderTask" type="NewsletterStudio.Services.RenderTasks.Tasks.ReplaceUniqMergeFieldsRenderTask, NewsletterStudio" />
          <task name="InsertCustomDataRenderTask" type="NewsletterStudio.Services.RenderTasks.Tasks.InsertCustomDataRenderTask, NewsletterStudio" />
          <task name="PreMailer" type="NewsletterStudio.Services.RenderTasks.Tasks.CssPremailerRenderTask, NewsletterStudio" />
          <clear />
          <provider name="NewsletterStudioSubscriptionProvider" type="NewsletterStudio.Bll.Providers.NewsletterStudioSubscriptionProvider, NewsletterStudio" />
          <provider name="UmbracoNewSubscriptionProvider" type="NewsletterStudio.Bll.Providers.UmbracoNewSubscriptionProvider, NewsletterStudio" />

    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.

  • Markus Johansson 1658 posts 4727 karma points c-trib
    May 21, 2018 @ 12:48
    Markus Johansson


    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:

    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.

  • Tom Chance 20 posts 101 karma points
    May 21, 2018 @ 13:34
    Tom Chance

    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:

    <a href="[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!)

  • Markus Johansson 1658 posts 4727 karma points c-trib
    May 21, 2018 @ 14:28
    Markus Johansson

    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]

    Sorry for the inconvenience.

    // m

  • Nandoh 32 posts 104 karma points
    May 23, 2018 @ 16:34

    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?

    PS: I'm using the there any incompatibility?


  • Tom Chance 20 posts 101 karma points
    Jun 05, 2018 @ 10:05
    Tom Chance

    Hi Markus,

    Happy to wait for next release!

    Thank you ever so much for resolving :)

Please Sign in or register to post replies

Write your reply to: