Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Sean Dooley 271 posts 488 karma points
    Aug 20, 2020 @ 13:10
    Sean Dooley
    0

    Umbraco custom workflow throws "Object reference not set to an instance of an object" but is never hit?

    We had a custom workflow that was working until we upgraded to Umbraco Forms 7.4.1. Since then, the custom workflow throws the following error

    [NullReferenceException: Object reference not set to an instance of an object.]
        Umbraco.Forms.Data.StringHelper.ParseRecordPlaceholders(String value, IRecord record) +237
        Umbraco.Forms.Data.StringHelper.ParsePlaceHolders(HttpContext context, Record record, String value) +74
        Umbraco.Forms.Data.StringHelper.ParsePlaceHolders(Record record, String value) +39
        Umbraco.Forms.Core.Services.WorkflowService.ExecuteWorkflows(List`1 workflows, RecordEventArgs e) +453
        Umbraco.Forms.Core.Services.WorkflowService.ExecuteWorkflows(Record record, Form form, FormState state, Boolean editMode) +183
        Umbraco.Forms.Web.Services.RecordService.Approve(Record record, Form form) +287
        Umbraco.Forms.Web.Services.RecordService.Submit(Record record, Form form) +702
        Umbraco.Forms.Web.Controllers.UmbracoFormsController.SubmitForm(Form form, FormViewModel model, Dictionary`2 state, ControllerContext context) +1947
        Umbraco.Forms.Web.Controllers.UmbracoFormsController.GoForward(Form form, FormViewModel model, Dictionary`2 state) +58
        Umbraco.Forms.Web.Controllers.UmbracoFormsController.HandleForm(FormViewModel model, Boolean captchaIsValid) +442
        lambda_method(Closure , ControllerBase , Object[] ) +143
        System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +14
        System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +157
        System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +37
        System.Web.Mvc.Async.<>c.<BeginInvokeSynchronousActionMethod>b__9_0(IAsyncResult asyncResult, ActionInvocation innerInvokeState) +22
        System.Web.Mvc.Async.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult) +29
        System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
        System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +32
        System.Web.Mvc.Async.<>c__DisplayClass11_0.<InvokeActionMethodFilterAsynchronouslyRecursive>b__0() +58
        System.Web.Mvc.Async.<>c__DisplayClass11_2.<InvokeActionMethodFilterAsynchronouslyRecursive>b__2() +228
        System.Web.Mvc.Async.<>c__DisplayClass11_2.<InvokeActionMethodFilterAsynchronouslyRecursive>b__2() +228
        System.Web.Mvc.Async.<>c__DisplayClass11_2.<InvokeActionMethodFilterAsynchronouslyRecursive>b__2() +228
        System.Web.Mvc.Async.<>c__DisplayClass11_2.<InvokeActionMethodFilterAsynchronouslyRecursive>b__2() +228
        System.Web.Mvc.Async.<>c__DisplayClass11_2.<InvokeActionMethodFilterAsynchronouslyRecursive>b__2() +228
        System.Web.Mvc.Async.<>c__DisplayClass7_0.<BeginInvokeActionMethodWithFilters>b__1(IAsyncResult asyncResult) +10
        System.Web.Mvc.Async.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult) +10
        System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
        System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +34
        System.Web.Mvc.Async.<>c__DisplayClass3_6.<BeginInvokeAction>b__4() +35
        System.Web.Mvc.Async.<>c__DisplayClass3_1.<BeginInvokeAction>b__1(IAsyncResult asyncResult) +100
        System.Web.Mvc.Async.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult) +10
        System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
        System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +27
        System.Web.Mvc.<>c.<BeginExecuteCore>b__152_1(IAsyncResult asyncResult, ExecuteCoreState innerState) +11
        System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +29
        System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
        System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +45
        System.Web.Mvc.<>c.<BeginExecute>b__151_2(IAsyncResult asyncResult, Controller controller) +13
        System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +22
        System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
        System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +26
        System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
        System.Web.Mvc.<>c.<BeginProcessRequest>b__20_1(IAsyncResult asyncResult, ProcessRequestState innerState) +28
        System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +29
        System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
        System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +28
        System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
        System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +584
        System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +132
        System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +173
    

    When the workflow is disabled, the form submits and redirects as expected.

    When attempting to debug the issue locally, the error is being thrown before the custom workflow is being hit suggesting there maybe an underlying issue somewhere else.

    I can see there there may have been a fix in version 8.5.1 (https://our.umbraco.com/packages/developer-tools/umbraco-forms/) but could the same issue be affecting version 7.4.1.

    Any ideas?

  • Nathan Woulfe 410 posts 1529 karma points MVP 3x c-trib
    Sep 20, 2020 @ 23:40
    Nathan Woulfe
    0

    I'm seeing the same error after upgrading to 7.4.1 - is happening on some forms using the default Umbraco send email workflow. Removing the workflow and re-adding it seems to fix the issue.

    Wondering if something went a bit off-kilter in the upgrade, these were all working fine previously.

Please Sign in or register to post replies

Write your reply to:

Draft