We have several email templates, both campaign and transactional, where we insert links to business site pages, eg, pages of the secondary root with a separate domain as above.
as the anchor’s href value. The URLs render correctly in the preview tab.
However, in the email, it comes as a broken link (anchor with empty href).
Hacking the issue
Since the beginning, we have gone around this by inserting URLs manually, which means, instead of selecting the relevant content node when inserting the link, we just fill in the Link field with the full page URL we want to link to. This can obviously lead to mistakes.
As we are getting more and more email templates, this becomes more difficult to control.
This might not help but in the past I extracted the hyperlinks (using regex) from the content editor, obtaining the correct underlying link from the umb URL and then resave/publish the content.
Although this worked, I don’t know if it would satisfy all scenarios that you may have.
Why haven’t you updated Umbraco to the latest 13? I don’t know all the changes and fixes from the top of my head, but if you are having issues, wouldn’t it make sense to at least have the latest minor version of Umbraco?
Sounds like a frustrating issue! Thank you for reaching out to help me understand the issue.
I tried to reproduce this problem but I could not get the empty anchor that you’re referring to.
Did you configure the “Culture and Hostname” correctly for the root nodes in the Content-tree so that the resolved URLs are correct?
Would you mind trying to explain the problem in a little more detail so that I can understand what’s happening, since the preview rendering works it sounds like something is going wrong during the creation of the tracking liks (like you said).
Can you please also ensure to include:
Information about your culture and hostname setup
Step by step guide on the setup
Exact details about the links, are you adding any question string etc?
Detailed explanation of where/when the a href attribute becomes empty.
No, when it doesn’t work, I mean that the tracking URL does not appear in the anchor in the email body. The anchor is empty, with only the query string if there is any qs provided in the URL in the text control.
I’ve spent quite some time trying to replicate the issue on Umbraco 13.2.1 and Newsletter Studio 13.0.6.
Here is a example of a full walk trough of the setup and the result, all the links in the sent emails include the path (not just the query string) in the URL:
Is this how you’re setup looks as well?
Do you have any kind of custom code around Newsletter Studio in your setup? I’m thinking things like custom [Render Tasks](Render Tasks | Documentation | Newsletter Studio) or any kind of custom views etc?
If we cannot figure this out over the forum we could maybe talk over email or schedule a Teams meeting or something so that we can try narrow down the issue togheter.
The package has a mechanism that will make any relative links or image references absolute, but it seems like the problem here is that the href-attribute becomes totally empty.