Skip to main content
added 30 characters in body
Source Link
Mark Gibbons
  • 5.7k
  • 1
  • 19
  • 61

The error you see is happening because the NavigationDataModelBinder which runs before it gets to BaseFormBuilderController.ProcessFormData has not been able to set the NavigationData due to these checks:

  string[] buttonValues = this.GetButtonValues(buttonId, bindingContext);
  if (buttonValues != null && buttonValues.Length <= 1)
    return (NavigationData) null;
  int result1;
  if (!int.TryParse(buttonValues?[1], out result1))
    return (NavigationData) null;

This happens when for some reason the Submit button on the form does not send at least 2 values where the 2nd value is an int.

From the couple of times I've seen this it is because of some javascript that is catching the submit click event and doing event.preventDefault(); or event.stopPropagation(); which prevents the jquery unobstrusive ajax handler from getting the value when serializing it.

So look for things like a document.click() handler that could be interrupting this.

When you say that un-minifying the javascript has helped, then it could be a race condition somewhere. Also check that the form isn't being submitted twice somehow via double event handler registration.

The error you see is happening because the NavigationDataModelBinder which runs before it gets to BaseFormBuilderController.ProcessFormData has not been able to set the NavigationData due to these checks:

  string[] buttonValues = this.GetButtonValues(buttonId, bindingContext);
  if (buttonValues != null && buttonValues.Length <= 1)
    return (NavigationData) null;
  int result1;
  if (!int.TryParse(buttonValues?[1], out result1))
    return (NavigationData) null;

This happens when for some reason the Submit button on the form does not send at least 2 values where the 2nd value is an int.

From the couple of times I've seen this it is because of some javascript that is catching the submit click event and doing event.preventDefault(); which prevents the jquery unobstrusive ajax handler from getting the value when serializing it.

So look for things like a document.click() handler that could be interrupting this.

When you say that un-minifying the javascript has helped, then it could be a race condition somewhere. Also check that the form isn't being submitted twice somehow via double event handler registration.

The error you see is happening because the NavigationDataModelBinder which runs before it gets to BaseFormBuilderController.ProcessFormData has not been able to set the NavigationData due to these checks:

  string[] buttonValues = this.GetButtonValues(buttonId, bindingContext);
  if (buttonValues != null && buttonValues.Length <= 1)
    return (NavigationData) null;
  int result1;
  if (!int.TryParse(buttonValues?[1], out result1))
    return (NavigationData) null;

This happens when for some reason the Submit button on the form does not send at least 2 values where the 2nd value is an int.

From the couple of times I've seen this it is because of some javascript that is catching the submit click event and doing event.preventDefault(); or event.stopPropagation(); which prevents the jquery unobstrusive ajax handler from getting the value when serializing it.

So look for things like a document.click() handler that could be interrupting this.

When you say that un-minifying the javascript has helped, then it could be a race condition somewhere. Also check that the form isn't being submitted twice somehow via double event handler registration.

Source Link
Mark Gibbons
  • 5.7k
  • 1
  • 19
  • 61

The error you see is happening because the NavigationDataModelBinder which runs before it gets to BaseFormBuilderController.ProcessFormData has not been able to set the NavigationData due to these checks:

  string[] buttonValues = this.GetButtonValues(buttonId, bindingContext);
  if (buttonValues != null && buttonValues.Length <= 1)
    return (NavigationData) null;
  int result1;
  if (!int.TryParse(buttonValues?[1], out result1))
    return (NavigationData) null;

This happens when for some reason the Submit button on the form does not send at least 2 values where the 2nd value is an int.

From the couple of times I've seen this it is because of some javascript that is catching the submit click event and doing event.preventDefault(); which prevents the jquery unobstrusive ajax handler from getting the value when serializing it.

So look for things like a document.click() handler that could be interrupting this.

When you say that un-minifying the javascript has helped, then it could be a race condition somewhere. Also check that the form isn't being submitted twice somehow via double event handler registration.