The form_alter hook in taxonomy_place.module will throw an error if the $form_state form object is not an instance of EntityFormInterface. For instance when running a ViewsBulkOperation:
Error: Call to undefined method Drupal\views_bulk_operations\Form\ConfigureAction::getEntity() in taxonomy_place_field_widget_form_alter() (line 18 of modules/contrib/taxonomy_place/taxonomy_place.module).
Need to add:
if (!$form_state->getFormObject() instanceof EntityFormInterface) {
return;
}
on line 15.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | add_EntityFormInterface_check_on_form_alter_hook_3045356_2.patch | 554 bytes | brooke_heaton |
Comments
Comment #2
brooke_heaton commentedAdd instanceof EntityFormInterface check.
Comment #3
brooke_heaton commentedComment #4
brooke_heaton commentedComment #6
karens commentedLooks good except missing the use statement for that class, so I'm adding that. Thanks!