I love the user interface that this module makes possible! However, I wasn't able to create an instance of this field at first. Before I made the attached changes, going to /admin/structure/types/manage/[some node type]/fields/add-field, choosing the "Text or entity reference" field type, naming my field, and clicking "Save or continue" got me several of the following warnings:
Notice: Undefined index: target_bundles in [site root]/modules/contrib/text_or_entity/text_or_entity.module on line 173
...and then an error:
The website encountered an unexpected error. Please try again later.
ArgumentCountError: Too few arguments to function Drupal\text_or_entity\Plugin\Field\FieldFormatter\TextOrEntityReferenceLabelFormatter::__construct(), 7 passed in [site root]/core/lib/Drupal/Core/Field/FormatterPluginManager.php on line 67 and exactly 8 expected in Drupal\text_or_entity\Plugin\Field\FieldFormatter\TextOrEntityReferenceLabelFormatter->__construct() (line 55 of modules/contrib/text_or_entity/src/Plugin/Field/FieldFormatter/TextOrEntityReferenceLabelFormatter.php).
This patch addresses both of these, as well as a stray space in a property definition in TextOrEntityReferenceLabelFormatter.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | text_or_entity-33109228-field_creation_notice-3.patch | 823 bytes | czigor |
| #2 | 3109228-2.patch | 2.07 KB | bdimaggio |
Comments
Comment #2
bdimaggioComment #3
czigor commentedComment #5
czigor commented