- Issue created by @elaine.ong
- Merge request !32Issue #3489780: Unable to update a scheduled record → (Open) created by Unnamed author
- 🇮🇳India vinayakmk47
The issue was caused by the wrapper key being accessed without ensuring its existence in the field value, resulting in a "Undefined array key" error during form validation.
I updated the validateElement() method to use null coalescing (??) to check if the wrapper key exists before accessing it. If the wrapper key is not present, the logic now defaults to handling the field's value directly. This ensures robust validation and prevents runtime errors.
The changes involve validating the structure of $form_state->getValue() and avoiding assumptions about the presence of the wrapper key in the datetime field.
I tested the fix by creating and updating scheduled records. The form now works as expected without errors. Both valid and invalid inputs are handled correctly, and the error messages display as intended.
Please review the changes and let me know if any additional adjustments are required. I'm happy to make further improvements if needed.
- 🇲🇾Malaysia elaine.ong
Hi @vinayakmk47 May I know what is the next step to get the fix deployed?