SparkDevNetwork / Rock

An open source CMS, Relationship Management System (RMS) and Church Management System (ChMS) all rolled into one.
http://www.rockrms.com
579 stars 352 forks source link

Send Photo Request test gives parameter 'address' error #798

Closed ElimAdmin closed 9 years ago

ElimAdmin commented 9 years ago

Clicking Test on the Photo Request page gives error message: "The parameter 'address' cannot be an empty string. Parameter name: address." Checking the boxes doesn't make a difference.

sendpicreq1


Exception Error Details: An exception has occurred. Details of this error can be found below: An error occurred on the Rock RMS site on page: http://elimrms.org:80/page/316 HttpUnhandledException in System.Web Message Exception of type 'System.Web.HttpUnhandledException' was thrown. Stack Trace at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.themes_rock_layouts_fullwidth_aspx.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) -ArgumentException in System Message The parameter 'address' cannot be an empty string. Parameter name: address Stack Trace at System.Net.Mail.MailAddress..ctor(String address, String displayName, Encoding displayNameEncoding) at System.Net.Mail.MailAddress..ctor(String address, String displayName) at Rock.Communication.Transport.SMTPComponent.Send(Communication communication) at Rock.Communication.MediumComponent.Send(Communication communication) at Rock.Communication.Medium.Email.Send(Communication communication) at RockWeb.Blocks.Crm.PhotoSendRequest.btnTest_Click(Object sender, EventArgs e) at System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

nairdo commented 9 years ago

@ElimAdmin It's because there is a missing From address in the Photo Request Template (under Admin Tools > Communication Settings > Communication Templates). Can you confirm that the issue goes away after you set that value? We'll put safeguards in the block to check for that too.

ElimAdmin commented 9 years ago

@nairdo Yes - setting those values does resolve this. Maybe even a little more guidance in the error message could help point someone to do this. Thanks.

nairdo commented 9 years ago

@ElimAdmin Yes. In that situation this cc47358 change will now show the message "The '{0}' communication template is missing a From address."

nairdo commented 9 years ago

Slight change of plans (for the better). This new change now means it will work the way it used to -- even if there is no from address defined in the template it will use the GlobalAttribute's OrganizationEmail value.