WFFM | SendEmail Message Action when clicked on Edit throwing Object reference not set to an instance. Below is the error.

[NullReferenceException: Object reference not set to an instance of an object.]
   Sitecore.Forms.Shell.UI.Dialogs.SendMailEditor.FillContextMenu(ContextMenu menu, String allowedTypes, Edit insertValueTo, GenericControl link, Image img, Literal label) +301
   Sitecore.Forms.Shell.UI.Dialogs.SendMailEditor.OnLoad(EventArgs e) +448

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
   System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +76
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +211
   System.Reflection.MethodBase.Invoke(Object obj, Ob`enter code here`ject[] parameters) +35
   Sitecore.Web.UI.Sheer.ClientPage.OnLoad(EventArgs e) +337
   System.Web.UI.Control.LoadRecursive() +71

5 Replies

  • What Sitecore version? If you disassemble this Sitecore.Forms.Shell.UI.Dialogs.SendMailEditor class, can you see anything that might be null in this case?
  • Did you find resolution of this error? i am getting similar issue.
  • can you provide some code or is it the default send email action?

  • In reply to Dirk Schäfauer:

    The SendMailEditor.OnLoad() method checks if the user has access to the /sitecore/content/Applications/Layouts/IDE item in the core database.

    Check permission.
  • Replying to a very old post, but maybe it will help someone. I had this problem too and it turned out I had the dlls from WFFM 9.0 rev. 180503 together with the files of a previous version. The problem arose because of the 'Localized' checkbox used in the code-behind (or beside, whatevz) which wasn't defined in my version of "sitecore\shell\Applications\Modules\Web Forms for Marketers\Dialogs\Action Editor\SendEmail.xml". Extracting the appropriate files from the zip solved it for me.