Copied to clipboard

Flag this post as spam?

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

  • ewuski 97 posts 263 karma points
    May 08, 2024 @ 17:21

    Issues inserting a content link with params in email template

    Umbraco 10.8.3, NS 10.0.14

    Following various fixes described here:

    1. Fix to utm_content:

    2. Fix to transactional emails operating in a loop described here:

    3. Support for merge fields in query string described here:

    we keep testing the transactional email feature.

    We noticed new issues:

    Issue 1.

    When we add more than one param in a query string when inserting a link in an email body, the query gets encoded and & converts into &amp%3B. This means the subsequent query parameters (except the first one) are not read correctly by the target.

    We've been testing transactional emails but this is likely affecting campaign emails as well.

    Eg. we add a query to a URL:


    This results in a query string as:


    so br param is not recognised by the target.

    Steps to replicate:

    1. Design an email: add a Text control.

    2. Add a link in the Text control and select an existing content page as a target.

    3. After selecting the target, add a query string in the Anchor/Query string field that contains two params at least, eg: utm_content=body&br=aaaa

    enter image description here

    1. Save the template.

    2. Send the email(s) and check the link target.

    3. The target url comes with params with & encoded, eg.


    Issue 2.

    If there is a merge field as a query string param, an error occurs when reading the anchor target on edit.

    Follow the points 1-4 above with an exception that instead of hardcoded param values add at least one that contains a merge field:

    1. Go back to edit the Text control you've just added. Click to edit the link.

    2. Two errors display as the anchor is unable to find the target page selected:

    enter image description here

    The Link field now displays the target page UDI instead of the target path:

    enter image description here

    The issue does not occur if no param with a merge field exists in the Query string.

    Issue 3:

    The RTE icons are not displaying when adding a Text control to a campaign or email:

    enter image description here

    This looks like an issue related to NS version as we have NS version 10.0.13 on production where the icons work correctly though locally we have installed version 10.0.14 (following the fix described here: and the icons are gone.

  • Markus Johansson 1924 posts 5831 karma points MVP 2x c-trib
    May 08, 2024 @ 20:48
    Markus Johansson


    Let's take them one by one.

    Issue 1

    I can confirm this on Umbraco 10.8.5, I'm not sure when this was introduced but it seems like the rich text editor (TinyMce) is encoding the &-signs. Could be a Tiny-upgrade or some setting.

    If you're sending a transactional email I would recommend putting the whole URL into model/merge field so that you only need

    <a href="{mergeField}">Link</a>

    I need to back track when this started to surface and provide a was to handle it in the package. Keep you posted.

    Issue 2

    If I understand your here right you're having problem adding a link with a merge field from the link picker in the Rich Text Editor?

    This is a bug in Umbraco and a PR was submitted that has been merged into Umbraco 13.1.0.

    Please see the link from the forum-thread you linked to:

    If you need links that is dynamic my recommendation is include the full link as as a merge fields or insert them in the transactional email model, this way you can also ensure that the link is not "tampered" with by mistake from any editor.

    Issue 3:

    The upgrade between 10.0.13 to 10.0.14 was only a very small change in the C# code so it has to be related to something other then the package. Did you try to reset browser cache, clear any smidge cache etc?

    Do you see any javascript errors in the console?

    It works on a clean install:

    enter image description here


  • Markus Johansson 1924 posts 5831 karma points MVP 2x c-trib
    May 08, 2024 @ 21:53
    Markus Johansson

    Hi again!

    Reg. Issue 1.

    I've just released a fix for the issue with the encoded ampersands,

    Should be a simple upgrade from 10.0.14 to 10.0.15:

    Same fix will be applied to other versions of the package as well, look at the version history here:

    // Markus

  • ewuski 97 posts 263 karma points
    27 days ago

    Issue 1. Resolved with version 10.0.15

    Issue 2. We are still to upgrade to U13. However, the issue does not prevent links from rendering correctly in the email body.

    Issue 3. Resolved. Not sure what it was?

    Thanks for quick help!

  • ewuski 97 posts 263 karma points
    27 days ago

    I'm afraid I discovered another issue :(

    Let's say I am inserting a merge field with the following value:




    This is an encrypted string and they often have single or double equal marks at the end.

    The correct value of the model property is being passed to the transactional email.

    If I put this value in the email body as ad text, it shows correctly as above.

    If I add this value as a URL param, eg.


    which should resolve respectively to:



    and click the link in the received email body, I get the following in my browser:



    That means, the bit at the end: "==" is getting stripped from the value which causes the value to be incorrect when requested at the target URL.

    Btw I understand the suggestion to replace the entire URL with a merge field. However, in this case, we would need to create a transaction model that holds a property and equivalent merge field for every possible URL that uses the param and that we may add to the email. That's not very maintainable and limits a lot the flexibility we gain in creating email templates with NS.

  • Markus Johansson 1924 posts 5831 karma points MVP 2x c-trib
    24 days ago
    Markus Johansson


    Issue 1


    Issue 2

    This is a bug in Umbraco so it's out of our control. See the linked issue. The problem is in how Umbraco stores the selected content inside the RTEs markup.

    Since the value is stored in the wrong way, we can't do anything about it.

    Your best option is to upgrade Umbraco or to use a merge field that holds the full URL.

    Issue 3


    Issue 4

    I need to look closer at why these are removed from the query string, as far as I know, we're using the .NET native stuff to parse the query string.

    Are you on version 10.0.15 now?

    A good solution would be to adjust your algorithm to use base62 encoding or even better base32 to avoid special characters in the URL.,in%20an%20ASCII%20string%20format.

    I'll keep you posted about this issue.

Please Sign in or register to post replies

Write your reply to: