November Happy Hour will be moved to Thursday December 5th.

Forms javascript error: Cannot set property '$workingForm' of undefined

Vote:
 

Hi all, 

I am getting the following javascript error when viewing a page containing an episerver forms form:

Uncaught TypeError: Cannot set property '$workingForm' of undefined
    at c (WebResource.axd?d=TzRGlCddaaqtz0Im2nSJhBwZdVbGfjHXRFirWxREfeNw6ih9UL4AG6If6n80LLLBvlyxcDr8To7h0nfo3Dg6Ze1JicMBLv8y0lQfjXqosUuuIdk_xOajowEEP59OxX88w6CEDPahbUwxtmReI1_Uefo_7odu26fjS48aRcVeXs81&t=637519926940000000:1)
    at HTMLFormElement.<anonymous> (WebResource.axd?d=TzRGlCddaaqtz0Im2nSJhBwZdVbGfjHXRFirWxREfeNw6ih9UL4AG6If6n80LLLBvlyxcDr8To7h0nfo3Dg6Ze1JicMBLv8y0lQfjXqosUuuIdk_xOajowEEP59OxX88w6CEDPahbUwxtmReI1_Uefo_7odu26fjS48aRcVeXs81&t=637519926940000000:1)
    at Function.each (WebResource.axd?d=JPojowp_K0840Fqo_p-O-ZP_-k-aGpccdSUwzqvuTRzsT76lG5IH3HV64jfz6Vcai6iLZ_O-kj1Cc52BqE15YesHlC-8C0pI2DBnPndh0tjVOk4xYxN39mXrCh7KPaRu02gpQJRvMJ9p0vM3UCAGlnORQK15QB_g5jG3rzzNqVY1&t=637519926940000000:2)
    at S.fn.init.each (WebResource.axd?d=JPojowp_K0840Fqo_p-O-ZP_-k-aGpccdSUwzqvuTRzsT76lG5IH3HV64jfz6Vcai6iLZ_O-kj1Cc52BqE15YesHlC-8C0pI2DBnPndh0tjVOk4xYxN39mXrCh7KPaRu02gpQJRvMJ9p0vM3UCAGlnORQK15QB_g5jG3rzzNqVY1&t=637519926940000000:2)
    at HTMLDocument.<anonymous> (WebResource.axd?d=TzRGlCddaaqtz0Im2nSJhBwZdVbGfjHXRFirWxREfeNw6ih9UL4AG6If6n80LLLBvlyxcDr8To7h0nfo3Dg6Ze1JicMBLv8y0lQfjXqosUuuIdk_xOajowEEP59OxX88w6CEDPahbUwxtmReI1_Uefo_7odu26fjS48aRcVeXs81&t=637519926940000000:1)
    at e (WebResource.axd?d=JPojowp_K0840Fqo_p-O-ZP_-k-aGpccdSUwzqvuTRzsT76lG5IH3HV64jfz6Vcai6iLZ_O-kj1Cc52BqE15YesHlC-8C0pI2DBnPndh0tjVOk4xYxN39mXrCh7KPaRu02gpQJRvMJ9p0vM3UCAGlnORQK15QB_g5jG3rzzNqVY1&t=637519926940000000:2)
    at t (WebResource.axd?d=JPojowp_K0840Fqo_p-O-ZP_-k-aGpccdSUwzqvuTRzsT76lG5IH3HV64jfz6Vcai6iLZ_O-kj1Cc52BqE15YesHlC-8C0pI2DBnPndh0tjVOk4xYxN39mXrCh7KPaRu02gpQJRvMJ9p0vM3UCAGlnORQK15QB_g5jG3rzzNqVY1&t=637519926940000000:2)

Not a single script is also loaded asynchronously.

I just upgraded to the newest episerver forms version (4.30.3) and also this doesn't fix the issue.

Any guidance on how to fix this?

Thanks!

#259983
Aug 03, 2021 14:50
Vote:
 

Hi Niels,

I had the same issue previously. The solution is in this blog post:

Episerver Forms – Cannot set property ‘$workingForm’ of undefined – nicolaayan.com

Thanks

#260067
Aug 04, 2021 15:16
Niels Brackeva - Aug 06, 2021 11:45
Hi Johnny,

Thanks for that post, but in my solution the script isn't async. So that doesn't solve the issue sadly.
Vote:
 

I having the same exact issue. The script tags are not asyc. Also I want to add that all html related to the script tag is automatically added when the user is adding a form. 

Any updates on this? 

#266231
Nov 04, 2021 16:54
Vote:
 

Hi there! 
We are experiencing the same issue at the moment. 

Any update? 

#268755
Dec 21, 2021 20:13
Vote:
 

Hi  Mauro, in my case, the issue was a reserved class name I was using on my .js template file, I was using EPIServerForms css class name. Changing that fixed my issues.

#269242
Dec 31, 2021 17:39
celerno - Dec 31, 2021 17:40
Hi Mauro, in my case, the issue was a reserved class name I was using on my .js template file, I was using EPIServerForms css class name. Changing that fixed my issues.
Vote:
 

Hi in my case, the issue was a reserved class name I was using on my .js template file, I was using EPIServerForms css class name. Changing that fixed my issues.

#269243
Edited, Dec 31, 2021 17:39
Vote:
 

Hi there! 

An update on our side. We are using Vue.js on the FE, and accidentally, the ContentArea that holds the form was moved into the Vue.js component. And because of that, the Form was not available at the time the JS were loaded. 

Making sure the ContentArea was rendered on the server side (outside Vue.js) solved it. 

#269524
Jan 06, 2022 13:17
* 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.