Sitecore / jss

Software development kit for JavaScript developers building web applications with Sitecore Experience Platform
https://jss.sitecore.com
Apache License 2.0
259 stars 270 forks source link

Can not read property of undefined Sitecore Jss 16.0 #1108

Closed kashifovrlod closed 3 weeks ago

kashifovrlod commented 2 years ago

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.

image

ambrauer commented 2 years ago

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.

stale[bot] commented 1 month ago

This has been automatically marked as stale because it has not had recent activity. It will be closed if there is no further activity within 30 days. You may add comments or the 'keep' label to prevent it from closing. Thank you for your contributions.