2

I'm getting this error when trying to send an email campaign, so I've debuged the pipeline Sitecore.Modules.EmailCampaign.Core.Pipelines.GenerateLink.SetServerUrl and came to conclusion that the LinkManager.GetItemUrl for any email item is getting the following link: https:///sitecore-modules/shell/Email/Messages/2019/12/19T10270075/Announcement

It seams that hostname is missing and this causes an exception when trying to create a new URI because of the extra slash, am I missing some configuration on EXM?

20160 10:33:09 ERROR Exception: System.UriFormatException Message:
Invalid URI: The hostname could not be parsed. Source: System
    at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
    at Sitecore.Modules.EmailCampaign.Core.HostnameMapping.HostnameMappingService.GetServerUrl(Item
item)
    at Sitecore.Modules.EmailCampaign.Messages.HtmlMailBase.get_ServerUrl()
    at Sitecore.Modules.EmailCampaign.Messages.HtmlMailBase.get_PreviewBaseUrl()
    at Sitecore.Modules.EmailCampaign.Messages.HtmlMailBase.InsertEmailOpenedImg(Boolean
preview, String& html)
    at Sitecore.Modules.EmailCampaign.Messages.WebPageMail.GetMessageBody(Boolean
preview)
    at Sitecore.EmailCampaign.Cm.MessageInfo.FillContentEditorInfo()
5
  • Are you sending EXM Campaign Programmatically ? Please check MailMessage Class
    – Abhay Dhar
    Dec 19, 2019 at 11:21
  • No, i'm using Sitecore EXM interface, and i've notice that im getting the same error on exm logs when i go to the Message tab of an Email Campaing, the message body preview is unavailable because of this.
    – Tiago
    Dec 19, 2019 at 11:25
  • have you set the Default Settings(on the dashboard , right hand side) and Domains List , if you are using Sitecore MTA.
    – Abhay Dhar
    Dec 19, 2019 at 11:42
  • Yes i've Base URL (sc93sc.dev.local), and i'm using custom stmp.
    – Tiago
    Dec 19, 2019 at 12:15
  • Create support ticket if not already done
    – Abhay Dhar
    Dec 19, 2019 at 17:21

1 Answer 1

2

Do you have SXA installed? (or anything else that might have an impact on the linkprovider?)

I had the same issue with SXA installed and got a patch from Support. My issue was on 9.2 with SXA 1.9 after installing a patch - they did send me a new patch now. But I can reproduce the issue on a clean 9.3 setup with SXA as well. (9.3 probably had the change that was also in my patch which broke the link resolving)

Anyway.. as mentioned in the comments: ask Support for a patch as this is a bug. (unless you have a fully custom linkprovider that breaks it of course)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.