London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!

Forms not working after upgrade.

Vote:
0

We have recently upgraded our site to all latest versions, ( using 4.10.0.0 Forms). everything is running fine.

But when we go to submit a form, it doesnt work, wont send and content stays there and the submit button is then disabled.

It is throwing an 500 Error. for WebResource.axd

Below is error log from console:

Uncaught ReferenceError: returnedResult is not defined
at Object.error (WebResource.axd?d=TzRGlCddaaqtz0Im2nSJhHrt-7BfQVv8aewHqDIt8H9HhsHFbim15giBKNYgkK3zBUVFaaVgAafS1Ic-2qfR1yHDFAs3j50CVpNuVScuuIL3-n5XHDCRPS-3DVQhlbo5irDy-WDgbsetAXbOGlqmlzW9a1JQQr4dzC6Z34vFxDQ1&t=636572251696406253:1)
at i (WebResource.axd?d=rQapnFTl_pgMjn3yGS-nPus3_Ja1e7HwXkCMLpKmaI7wZtHbJt38lnerKJxtyh3ABWW8wA2wg23b55RyX--7SPFC_amSZ4s3kHjbIHjZ5ZcUe0-hIRv22DW_HSHeJm2h1VlDugpfPvp8B46NNEnr4xuoNiQlUos9fT4blyY89Cw1&t=636572251696406253:2)
at Object.fireWith [as rejectWith] (WebResource.axd?d=rQapnFTl_pgMjn3yGS-nPus3_Ja1e7HwXkCMLpKmaI7wZtHbJt38lnerKJxtyh3ABWW8wA2wg23b55RyX--7SPFC_amSZ4s3kHjbIHjZ5ZcUe0-hIRv22DW_HSHeJm2h1VlDugpfPvp8B46NNEnr4xuoNiQlUos9fT4blyY89Cw1&t=636572251696406253:2)
at y (WebResource.axd?d=rQapnFTl_pgMjn3yGS-nPus3_Ja1e7HwXkCMLpKmaI7wZtHbJt38lnerKJxtyh3ABWW8wA2wg23b55RyX--7SPFC_amSZ4s3kHjbIHjZ5ZcUe0-hIRv22DW_HSHeJm2h1VlDugpfPvp8B46NNEnr4xuoNiQlUos9fT4blyY89Cw1&t=636572251696406253:4)
at c (WebResource.axd?d=rQapnFTl_pgMjn3yGS-nPus3_Ja1e7HwXkCMLpKmaI7wZtHbJt38lnerKJxtyh3ABWW8wA2wg23b55RyX--7SPFC_amSZ4s3kHjbIHjZ5ZcUe0-hIRv22DW_HSHeJm2h1VlDugpfPvp8B46NNEnr4xuoNiQlUos9fT4blyY89Cw1&t=636572251696406253:4)
at Object.send (WebResource.axd?d=rQapnFTl_pgMjn3yGS-nPus3_Ja1e7HwXkCMLpKmaI7wZtHbJt38lnerKJxtyh3ABWW8wA2wg23b55RyX--7SPFC_amSZ4s3kHjbIHjZ5ZcUe0-hIRv22DW_HSHeJm2h1VlDugpfPvp8B46NNEnr4xuoNiQlUos9fT4blyY89Cw1&t=636572251696406253:4)
at Function.ajax (WebResource.axd?d=rQapnFTl_pgMjn3yGS-nPus3_Ja1e7HwXkCMLpKmaI7wZtHbJt38lnerKJxtyh3ABWW8wA2wg23b55RyX--7SPFC_amSZ4s3kHjbIHjZ5ZcUe0-hIRv22DW_HSHeJm2h1VlDugpfPvp8B46NNEnr4xuoNiQlUos9fT4blyY89Cw1&t=636572251696406253:4)
at b (WebResource.axd?d=TzRGlCddaaqtz0Im2nSJhHrt-7BfQVv8aewHqDIt8H9HhsHFbim15giBKNYgkK3zBUVFaaVgAafS1Ic-2qfR1yHDFAs3j50CVpNuVScuuIL3-n5XHDCRPS-3DVQhlbo5irDy-WDgbsetAXbOGlqmlzW9a1JQQr4dzC6Z34vFxDQ1&t=636572251696406253:1)
at Object. (WebResource.axd?d=TzRGlCddaaqtz0Im2nSJhHrt-7BfQVv8aewHqDIt8H9HhsHFbim15giBKNYgkK3zBUVFaaVgAafS1Ic-2qfR1yHDFAs3j50CVpNuVScuuIL3-n5XHDCRPS-3DVQhlbo5irDy-WDgbsetAXbOGlqmlzW9a1JQQr4dzC6Z34vFxDQ1&t=636572251696406253:1)
at Object. (WebResource.axd?d=rQapnFTl_pgMjn3yGS-nPus3_Ja1e7HwXkCMLpKmaI7wZtHbJt38lnerKJxtyh3ABWW8wA2wg23b55RyX--7SPFC_amSZ4s3kHjbIHjZ5ZcUe0-hIRv22DW_HSHeJm2h1VlDugpfPvp8B46NNEnr4xuoNiQlUos9fT4blyY89Cw1&t=636572251696406253:2)

#191127
Apr 20, 2018 15:01
Vote:
0

Do you have any custom code on the submit button that may interfere with the FormsMvcRouteHandler?

#191148
Apr 20, 2018 20:32
Vote:
0

The code has not been change since the upgrade, so no costom code, as far as i am aware:

<button type="submit" name="submit" value="<%: SubmitButtonType.NextStep.ToString() %>" class="Form__NavigationBar__Action FormExcludeDataRebind btnNext" <%: nextButtonDisableState %>><%: Html.Translate("/episerver/forms/viewmode/stepnavigation/next")%></button>

#191169
Apr 23, 2018 10:33
Vote:
0

if you browse to given link directly - what's being returned?

#191208
Apr 24, 2018 7:27
Vote:
0

Please show the description of error 500 along with stack trace, so we can detech what wrong with your forms.

#191212
Apr 24, 2018 9:18
Vote:
0

valdis iljuconoks if i navigate to the webResource.asxd?

i get: 

(function(n){if(typeof epi=="undefined"||typeof epi.EPiServer=="undefined"||typeof epi.EPiServer.Forms=="undefined"){console.error("Forms is not initialized correctly");return}if(typeof n=="undefined"){console.error("Forms cannot work without jQuery");return}var t=epi.EPiServer.Forms.Utils,i=epi.EPiServer.Forms.Data,r=epi.EPiServer.Forms.Extension,u=epi.EPiServer.Forms.Validation,f=epi.EPiServer.Forms.Navigation;epi.EPiServer.Forms.__DebounceTimer=null;epi.EPiServer.Forms.__Initialized=!(epi.EPiServer.Forms.__Initialized===undefined);n.extend(!0,epi.EPiServer.Forms,{Utils:{debounce:function(n,t){return function(){var i=this,r=arguments;clearTimeout(this.__DebounceTimer);this.__DebounceTimer=setTimeout(function(){n.apply(i,r)},t)}},loadExternalScriptOnDemand:function(n,t,i){for(var o=document.getElementsByTagName("head")[0],u=0,f=n.length,e=null,r;u<f;u++)e=n[u],r=document.createElement("script"),r.type="text/javascript",r.async=i||!1,r.defer=i||!1,r.src=e,o.appendChild(r),u===f-1&&this._setupCallback(r,t)},loadExternalCssOnDemand:function(n,t){for(var e=document.getElementsByTagName("head") ...

Dac Thach Nguyen 
Below is the Error log when the form is sumbited:

2018-04-24T07:33:10,Error,tsfg01ze518inte,ab2877,636601519900979825,0,9424,9,"EPiServer.Forms.Internal.Security.DefaultAntiForgeryValidator : Failed to validate the anti-forgery token

System.Web.Mvc.HttpAntiForgeryException (0x80004005): The required anti-forgery cookie "__RequestVerificationToken" is not present.

   at System.Web.Helpers.AntiXsrf.TokenValidator.ValidateTokens(HttpContextBase httpContext, IIdentity identity, AntiForgeryToken sessionToken, AntiForgeryToken fieldToken)

   at System.Web.Helpers.AntiXsrf.AntiForgeryWorker.Validate(HttpContextBase httpContext, String cookieToken, String formToken)

   at EPiServer.Forms.Internal.Security.DefaultAntiForgeryValidator.Validate(HttpContextBase httpContext)",

#191244
Apr 24, 2018 16:01
Vote:
1

if you are overriding forms block template, then you might be missing anti-forgery token added to the request.

<%= Html.GenerateAntiForgeryToken(Model) %>
#191245
Apr 24, 2018 16:23
Vote:
0

Thanks this worked valdis iljuconoks

#191255
Apr 24, 2018 17:44
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.