2sic / app-mobius-forms

Simple jQuery based 2sxc form - to use immediately or to modify as needed. Multi-language, simple, with Recaptcha

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can not send email with simple contact form

kingjordan opened this issue · comments

Hello,

Let me say first I am super excited about this app. Your contribution to the DNN ecosystem is amazing.

DNN version 8.0.4 (226)
2sxc version: 8.9.0
On local dnn install

I can import the app and configure the settings for the contact form adding my email etc.
The form data is captured and saved in the content "table"

PROBLEM: on submitting the form the error appears:

An unexpected error occured while sending. Please try again. If it fails again, please send it by E-Mail.

Cheers

THe following is the stack trace from the event log:

Message:Cannot perform runtime binding on a null reference
StackTrace:
   at CallSite.Target(Closure , CallSite , Object )
   at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0)
   at System.Web.WebPages.Instrumentation.HttpContextAdapter.get_PageInstrumentation()
   at System.Web.WebPages.Instrumentation.InstrumentationService.RunOnListeners(HttpContextBase context, Action`1 act)
   at System.Web.WebPages.WebPageExecutingBase.BeginContext(TextWriter writer, String virtualPath, Int32 startPosition, Int32 length, Boolean isLiteral)
   at ASP._Page_Portals_0_2sxc_Mobius_Forms_email_templates__Email_to_owner_cshtml.<>c__DisplayClass1.b__0(TextWriter __razor_helper_writer) in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\bbcceb7c\db3d20c6\App_Web_4gkscrlj.2.cs:line 0
   at System.Web.WebPages.HelperResult.ToString()
   at FormController.ProcessForm(Dictionary`2 contactFormRequest) in c:\Users\jordan\krisis dev\dnn sites\sites\effu-dev\website\Portals\0\2sxc\Mobius Forms\api\FormController.cs:line 92
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClassc.b__6(Object instance, Object[] methodParameters)
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Tracing.ITraceWriterExtensions.d__18`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ApiControllerActionInvoker.d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Tracing.ITraceWriterExtensions.d__18`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ActionFilterResult.d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.AuthorizationFilterAttribute.d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.AuthorizationFilterAttribute.d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.AuthorizationFilterAttribute.d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ExceptionFilterResult.d__0.MoveNext()

Can you clarify: did one of our forms fail, or one you changed?

Apparently there's an issue in the save-code, here https://github.com/2sic/app-mobius-forms/blob/master/api/FormController.cs#L92

seems like an information is missing. Could you find out if it's our form which is missing this, or your customization?

Sorry for the delay,

This was your simple contact form. I did not change anything. I add the module to the page, chose the simple contact form view, and then hit the edit/pencil to enter my email contact information. After trying to send an email the error listed above is logged in the event viewer and no email is sent but the "submitted" data is captured in the app.

I also tried it with the sample support request form and it also failed with the same error

Can you try this again with our latest release?
The bug is probably fixed now.

I tried to upload the package in the portal I already had it installed. I got an error saying it can not import because the mobius folder already exists. I will try installing it in a new portal

I tried to upload the package in the portal I already had it installed. I got an error saying it can not import because the mobius folder already exists. I will try installing it in a new portal

Sorry If this is not the right place, but I got this problem too with several apps.. I would like to know if there is a smart way to update an app that already exist...

@mangiove The update question should be handled in a separate thread
@kingjordan if your initial app isn't in use yet, you can also de-install the app and re-install it

I was able to delete the forms app and install the new version in my existing local dnn instance where the problem occurred. The problem still exists on the portal where I first tried it.

So I created a clean new dnn 8.0.4 local instance and installed the app. 2scx version 8.11 and Mobius 1.4.1 and the form works

Strange. Maybe some mail-settings in dnn? but I really don't know. I'll close this issue for now, as it seems installation specific. If you find out more which we should change, please do report. thx!