- Issue created by @Anybody
- Merge request !29Return early if one of the required parameters from form is not present. → (Open) created by Anybody
When trying to edit an entity with a non-admin user, I get the following error:
TypeError: entity_extra_field_display(): Argument #4 ($display) must be of type Drupal\Core\Entity\Display\EntityDisplayInterface, null given, called in /web/modules/contrib/entity_extra_field/entity_extra_field.module on line 78 in entity_extra_field_display() (line 111 of modules/contrib/entity_extra_field/entity_extra_field.module).
I found out that this is very specific and happens in Drupal commerce product editing, if the user doesn't have some permissions. But as it can happen, I'd suggest we should make this more robust, either by returning if $display
is NULL in the call or making the parameter optional in the definition.
I'd vote for the first option.
Active
2.1
Code