Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read properties of undefined (reading '42') #14

Open
honkerst opened this issue Jul 12, 2023 · 9 comments
Open

Cannot read properties of undefined (reading '42') #14

honkerst opened this issue Jul 12, 2023 · 9 comments

Comments

@honkerst
Copy link

Does this still work at all?

No matter what field I put in the repeater I get this error when loading the page, prior to clicking or typing anything.

Uncaught TypeError: Cannot read properties of undefined (reading '42') at HTMLDivElement.<anonymous> (gf-repeater2.js?ver=2.1.1:137:47) at Function.each (jquery.min.js?ver=3.6.4:2:3003) at e.<computed>.each (jquery.min.js?ver=3.6.4:2:1481) at HTMLDivElement.<anonymous> (gf-repeater2.js?ver=2.1.1:29:32) at Function.each (jquery.min.js?ver=3.6.4:2:3003) at e.<computed>.each (jquery.min.js?ver=3.6.4:2:1481) at gfRepeater_getRepeaters (gf-repeater2.js?ver=2.1.1:10:47) at HTMLDocument.<anonymous> (gf-repeater2.js?ver=2.1.1:961:7) at HTMLDocument.dispatch (jquery.min.js?ver=3.6.4:2:43184) at y.handle (jquery.min.js?ver=3.6.4:2:41168)

42 is the ID of the single line text field inside the repeater.

@scottsawyer
Copy link

I get that as well: Cannot read properties of undefined (reading '10')

@honkerst
Copy link
Author

I eventually concluded this method no longer works, and am now using the default Gravity Forms (beta) repeater instead: https://docs.gravityforms.com/repeater-fields/

@wolffe
Copy link
Owner

wolffe commented Jul 19, 2023

Did you code something yourself, or is there a readily-available plugin?

I don't know how to fix this issue, as I would need to remove jQuery and recode everything using vanilla JS. The main Gravity Forms plugin is advancing too quick, and the old method is really not working anymore.

I am open to any contributions or PRs to fix this issue.

@honkerst
Copy link
Author

Afraid not! I mostly went with Example 1 from that page and it seems to work well enough.

@wolffe
Copy link
Owner

wolffe commented Jul 19, 2023

Maybe when the repeater fields are out of beta, I might take the time to implement them into my plugin. The problem right now is time.

@scottsawyer
Copy link

I was revisiting this, reading the comments on the website, one of the last comments reads:
**Actually, I found out what the issue is. I had a contributor look at the plugin, and they discovered that if you refresh the form (back-end) and then save again, everything works. **

This worked for me

@wolffe
Copy link
Owner

wolffe commented Jul 20, 2023

This works, indeed, but it's not a long-term solution.

@bryomedia
Copy link

Had the same issue and this solution worked.

@manidip
Copy link

manidip commented Nov 1, 2023

This solution works, but the question is why its breaking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants