When an inline entity form is added to a Registrant type, it stops registrations from saving and produces this error:
Error: Call to a member function id() on null in Drupal\recurring_events_registration\Form\RegistrantForm->validateForm() (line 342 of /Users/the_glitch/Sites/My Suite 253/modules/contrib/recurring_events/modules/recurring_events_registration/src/Form/RegistrantForm.php)
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | recurring_events-ief_reg_broken-3145454-3.patch | 3.69 KB | owenbush |
Comments
Comment #2
owenbush commentedI have confirmed this. I believe this is because IEF actually validates the parent form when it is submitted, and the parent form in this case does some special stuff that IEF doesn't and so its throwing the error.
I'll investigate and figure out a fix.
Comment #3
owenbush commentedAttached is a patch which reworks some of the registration form work to prevent this issue from happening when elements in the form submit the form via AJAX. This would be an issue with IEF, but also potentially things like paragraphs or other AJAXified form elements.
Comment #6
owenbush commentedOP confirmed through Slack that the patch worked. So this has been merged and marked as fixed.
Comment #7
the_glitch commentedSorry. Yes the patch works.