Closed (fixed)
Project:
Entity Mesh
Version:
1.1.6
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
26 May 2025 at 09:21 UTC
Updated:
10 Jun 2025 at 06:54 UTC
Jump to comment: Most recent
The following error is thrown when a webform element is deleted:
Error: Call to undefined method Drupal\webform_ui\Form\WebformUiElementDeleteForm::getEntity() in entity_mesh_form_alter() (line 116 of /var/www/html/docroot/modules/contrib/entity_mesh/entity_mesh.module).

| Comment | File | Size | Author |
|---|---|---|---|
| webform-field-delete-error.png | 56.8 KB | frouco |
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
frouco commentedComment #3
frouco commentedComment #4
frouco commentedComment #6
lpeidro commentedComment #7
lpeidro commentedThe 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.
It is ready for QA.
Comment #8
lpeidro commentedComment #10
frouco commentedAfter applying the patch, deleting a webform element works correctly.
Comment #13
lpeidro commented