- Issue created by @frouco
- First commit to issue fork.
- 🇪🇸Spain lpeidro Madrid
The issue is that the getEntity() method is not implemented in all form classes — only in those that extend from ContentEntityForm.
To avoid this error, we should first check whether the form object is an instance of ContentEntityDeleteForm, or a compatible class, before calling the method.$form_object = $form_state->getFormObject(); if (!$form_object instanceof ContentEntityDeleteForm) { return; }
It is ready for QA.
- 🇪🇸Spain frouco
After applying the patch, deleting a webform element works correctly.