Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Given a BaseFieldDefinition field (entity refrerence type), set with an unlimited cardinality and with the chosen widget, chosen module then break the edit form of the entity.
The website encountered an unexpected error. Please try again later.
Error: Call to a member function getFieldStorageDefinition() on null in chosen_pre_render_select() (line 116 of modules/contrib/chosen/chosen.module).
chosen_pre_render_select(Array)
call_user_func('chosen_pre_render_select', Array) (Line: 378)
Because the field loaded is not a FieldConfig.
$field = FieldConfig::loadByName($element['#entity_type'], $element['#bundle'], $element['#field_name'])->getFieldStorageDefinition();
and therefore the $field is null and then we've got a fatal error.
Comment | File | Size | Author |
---|---|---|---|
#4 | 3088831-4.patch | 1.49 KB | flocondetoile |
|
Comments
Comment #2
flocondetoileComment #3
flocondetoileComment #4
flocondetoileComment #5
flocondetoileComment #7
nagy.balint CreditAttribution: nagy.balint at Agence Inovae commentedThanks!