gform.initializeOnLoaded is not a Function on Version 2.6.3 [RESOLVED]

In one of my client website, I found this error on backend. When I investigated on google there were some answers but those answers were not working with this version.

then I personally checked the issues.

so the problem is gravityforms/assets/js/dist/vendor-admin.min.js these dist js are loading before plugins/gravityforms/js/gravityforms.min.js so var gform; is undefined for those first enqueued js files and then all these errors starts.

why this happenening?
I checked the code and found that wp_register_script( 'gform_gravityforms_admin_vendors' this registration should have 'gform_gravityforms' as dependency. Currently there is no dependency on that registration of script.

I hope Gravity form team will test this solution and apply a good fix in future versions.

Thanks

1 Like

Hi Vijay. Thank you for the research. Were you experiencing any problems on the site, or did you only notice the errors in the console?

Sorry for the late response.

I had this issue on website backend while editing existing forms. I was unable to edit any form fields due to those errors.

After applying suggested dependency solutions, all the errors were gone and I was able to edit the fields normally.