1

We have such console errors logged while submitting the Sitecore forms. We are using Sitecore 9.3.

We have used multi-page form and when submitting the form it submits the data but in the developer tool it shows such an error with thank you page.

VM2954:1 Uncaught TypeError: Cannot read properties of undefined (reading 'Constructor')
    at <anonymous>:1:19
    at b (jquery.min.js:2:839)
    at Function.globalEval (jquery.min.js:2:2878)
    at Object.dataFilter (jquery.min.js:2:80619)
    at jquery.min.js:2:79084
    at l (jquery.min.js:2:79486)
    at XMLHttpRequest.<anonymous> (jquery.min.js:2:82254)
    at Object.send (jquery.min.js:2:82613)
    at Function.ajax (jquery.min.js:2:78223)
    at Function.<anonymous> (jquery-migrate.js:378:22)
    
VM2567:3 Uncaught TypeError: Cannot read properties of undefined (reading 'parse')
    at HTMLFormElement.eval (eval at a (jquery.unobtrusive-ajax.min.js:16:157), <anonymous>:3:25)
    at Object.success (jquery.unobtrusive-ajax.min.js:16:1361)
    at c (VM2387 jquery.min.js:2:28294)
    at Object.fireWith [as resolveWith] (VM2387 jquery.min.js:2:29039)
    at l (VM2387 jquery.min.js:2:79800)
    at XMLHttpRequest.<anonymous> (VM2387 jquery.min.js:2:82254)
eval @ VM2567:3
success @ jquery.unobtrusive-ajax.min.js:16

1 Answer 1

1

I've seen such issues with the Sitecore form. If you are using a bundling/minification try with unbundled js once to get more information for syntax error if this occurs due to any custom js file. Also if required js are not loading in a required order then possibly such error occurs.

Try out the below fixes

  1. Make sure jquery.min.js file load only once on the page.

  2. Check the order of the experience forms scripts.

    enter image description here

Hope it helps!

1
  • Thanks @Sumit, Your input works for us, jquery.min was loading multiple times.
    – RKV
    Jul 17, 2023 at 14:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.