1
votes

I have an email field in a form. On submission, I am then trying to email the form values, but it seems that Sitecore cannot find the field element, even through I've used the built in Email Template editor to add the placeholders.

Exception: System.InvalidOperationException
Message: String variable is null or empty.
Source: Sitecore.Kernel
   at Sitecore.Diagnostics.Assert.IsNotNullOrEmpty(String value, String message)
   at Sitecore.Modules.EmailCampaign.Util.AssertNotNullOrEmpty(String var)
   at Sitecore.Modules.EmailCampaign.Layouts.GetUserFields.OnLoadComplete(EventArgs e)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Anyone know a way around this?

1
This needs more clarification. When you say "on submission", what are you talking about? Is this using a form submission (like using WFFM or something along that line) that is then supposed to send an email with the form values? Or did you build a form on an email template and are trying to send a bulk mail with the form on the email template... which I can tell you is going to run in to issues based on how the email is built during the mailing process. - divamatrix

1 Answers

1
votes

It turns out that the Sitecore was trying to replace a token with a field value that did not exist. The error is a little deceptive since I believe most programmers would have thrown a more detailed exception.