jss
jss copied to clipboard
Can not read property of undefined Sitecore Jss 16.0
I'm working on Sitecore 10.1 JSS React project which utilizing Sitecore Form as well. During the testing we faced a weird issue that one the form stop working and not rendered correctly, screenshot attached.
Content Editor Created this form with fields that wrap within the section and the form working fine. By mistake Content author move two of the field from their section to other section and leave the section Empty. Content author verified the Form in Experience Editor and got the following error. After verifying each field, we didn't identified the actual cause. after that we reviewed and compare the base templates by with form is created and found that there are two empty section. I remove the first empty section but it didn't resolve the error, after removing the second empty section from the Form, error has gone and resolve the issue as well.
So, there are some issue in the JSS react form module that is didn't check the fields within the sections and try to iterate over the section field and that is causing the issue.
Hi @kashifovrlod! Thanks for the information, I've added this to our backlog to investigate / fix in a future release.
We also gladly accept pull requests if you'd like to take a stab at it. Check the contributing guide and we'll be happy to merge it in.