Also for you convenience .
From developer tools:
Uncaught TypeError: Cannot read properties of null (reading 'parentElement')
at FormValidator.getErrorElement (form-validator.js?68c5:679:34)
at FormValidator.validateRules (form-validator.js?68c5:546:1)
at FormValidator.validate (form-validator.js?68c5:201:1)
at EventWindow.eventSave (event-window.js?b7e0:1170:1)
From form-validator.js file
line 677
// Get error element by name
FormValidator.prototype.getErrorElement = function (name) {
// line bellow
this.infoElement = select(this.errorElement + '.' + this.errorClass, this.inputElement.parentElement);
if (!this.infoElement) {
this.infoElement = select(this.errorElement + '.' + this.errorClass + '[for="' + name + '"]', this.element);
}
return this.infoElement;
};
--------------------------------------------------------------------------
I had similar issue in treegrid component in edit template,
it solved by adding id="field_name" to edit template elements.
then in the action complete you will have changed data under args.data
Hi Sinisa,
Thank you for the update.
We reviewed the details, and the error appears to stem from a null parentElement reference during validation.
To guard against this, you can update the getErrorElement function in the FormValidator as follows:
FormValidator.prototype.getErrorElement = function (name) { if (!this.inputElement || !this.inputElement.parentElement) { console.warn('inputElement or parentElement is null for', name); return null; } this.infoElement = select(this.errorElement + '.' + this.errorClass, this.inputElement.parentElement); if (!this.infoElement) { this.infoElement = select(this.errorElement + '.' + this.errorClass + '[for="' + name + '"]', this.element); } return this.infoElement; }; |
This conditional check ensures that validation logic won’t break when parentElement is unavailable—especially useful when working with dynamically rendered templates.
If the issue still persists, please share a simplified, reproducible sample so we can investigate further and provide a more targeted solution.
Best regards,
Sreedhar Kumar
OK thanks, but where to update this ?
I'm not sure where to put this line of code.
And of corse this error comes when I heavy customise popUpFunction ( Editor ) inside of Scheduler component
Cheers,
Sinisa
Hi Sinisa,
We have branched this query with the respective Scheduler team
Regards,
Sreedhar Kumar.