0

When we tried to submit the form, we are getting NullReferenceException in FieldTrackingController. Its not even hitting our server side custom submit action. We did rebuild link database and indexing. We verified that necessary settings such as "/sitecore/system/Settings/Analytics/Page Events" are available in Sitecore content editor. But no luck.

Below is the error message:

Exception type: NullReferenceException 
    Exception message: Object reference not set to an instance of an object.
   at Sitecore.Analytics.Pipelines.RegisterPageEvent.RunPageEventRules.Process(RegisterPageEventArgs args)
   at (Object , Object )
   at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
   at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists)
   at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
   at Sitecore.Analytics.Pipelines.RegisterPageEvent.RegisterPageEventPipeline.Run(RegisterPageEventArgs args)
   at Sitecore.Analytics.Tracking.PageContext.Register(IEventDefinition eventDefinition, PageEventData pageData)
   at Sitecore.Analytics.Tracking.PageContext.Register(PageEventData pageData)
   at Sitecore.ExperienceForms.Analytics.Tracking.FormEventsTracker.RegisterFormBegin(FormTrackingEventData pageEventData)
   at Sitecore.ExperienceForms.Analytics.Tracking.FormEventsTracker.RegisterEvent[TEventData](TEventData trackingEventData)
   at Sitecore.ExperienceForms.Mvc.Controllers.FieldTrackingController.Register(IList`1 trackingEvents)
   at lambda_method(Closure , ControllerBase , Object[] )
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.c.b__9_0(IAsyncResult asyncResult, ActionInvocation innerInvokeState)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.c__DisplayClass11_0.b__0()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.c__DisplayClass11_2.b__2()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.c__DisplayClass11_2.b__2()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.c__DisplayClass3_6.b__4()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.c__DisplayClass3_1.b__1(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult)
   at System.Web.Mvc.Controller.c.b__152_1(IAsyncResult asyncResult, ExecuteCoreState innerState)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult)
   at System.Web.Mvc.MvcHandler.c.b__20_1(IAsyncResult asyncResult, ProcessRequestState innerState)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Request information:

Request URL: https://localhost:443/fieldtracking/register 
Request path: /fieldtracking/register 
User host address: ****
User: sitecore\admin 
Is authenticated: True 
Authentication Type: Cookies 
Thread account name: ***
6
  • 1
    Is the form working correctly if you disable fieldtracking on the fields in form editor? Could you also add some details about the sitecore version you are using? May 12 at 7:22
  • Hi Cristi, you are saying about uncheck 'Is Tracking Enabled' checkbox to disable fieldstracking...? We are using Sitecore 9.2
    – Thamizh
    May 12 at 7:29
  • Correct, not sure if you have analytics running correctly on your local machine. Can you also verify if you have all the forms page events defined in the folder /sitecore/system/Settings/Analytics/Page Events/Forms? May 12 at 8:10
  • By unchecking 'Is Tracking Enabled' - working like a champ...Thanks for the fix..we are able to export the form data also..However, we have all page events under the path "/sitecore/system/Settings/Analytics/Page Events/Forms" as i compared with vanilla instance. Still why its breaking if we enable 'Is Tracking Enabled'...Is that Sitecore.Analytics.Tracking.config enabled..is it causing problem?
    – Thamizh
    May 12 at 9:34
  • Do you have Xdb and Xdb.Tracking enabled on your machine and no issues in log files related to it? I assume you are getting the error also for a new form created? May 12 at 10:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.