-
Notifications
You must be signed in to change notification settings - Fork 182
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
594 Fix formChild is null #595
594 Fix formChild is null #595
Conversation
6253d1a
to
3309603
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will need to rebased with the latest MOODLE_401_STABLE so that only this PR's commit is present.
When a student completed a questionnaire then shown the "Thank you for completing this Questionnaire" page there was a JavaScript error: Uncaught TypeError: formChild is null This was because the JavaScript for the questions form was being inadvertently loaded for the Thank you page where this form is not present.
0f6ba48
to
31a3d4d
Compare
Apologies, rebased, hopefully this is correct now. Edit: No it isn't. More apologies. I'll see if I can sort this out. |
Maybe it is correct after all, please let me know if there are still issues with this. |
There was a fix added to the javascript here. This may already fix the problem you describe? |
No, in fact this issue only occurs once that fix has been applied. Fix 852486f allows the form checker to be run with Moodle 4.4 (instead of getting a console error), but this means a long-time bug re-emerges due to the form checker being incorrectly loaded for the "Thank you" page. If in doubt, install the latest MOODLE_401_STABLE of mod_questoinnaire and follow the steps in #594. |
I don't get that error using the latest MOODLE_401_STABLE. |
On the Thank You page? That's a mystery since there's no DOM element with the ID specified by the form checker code. I've just retested, on Moodle 4.4.2+ (Build: 20240823) with mod_questionnaire 5c0dbe8 and still see the error if I follow the steps from #594 (slightly different error because it's a different browser): |
Ah. Okay. I didn't realize you meant in the console. Yes, I do see that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the clarification.
When a student completed a questionnaire then shown the "Thank you for completing this Questionnaire" page there was a JavaScript error: Uncaught TypeError: formChild is null This was because the JavaScript for the questions form was being inadvertently loaded for the Thank you page where this form is not present.
When a student completed a questionnaire then shown the "Thank you for completing this Questionnaire" page there was a JavaScript error:
Uncaught TypeError: formChild is null
This was because the JavaScript for the questions form was being inadvertently loaded for the Thank you page where this form is not present.