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.

Comments

bdimaggio created an issue. See original summary.

bdimaggio’s picture

StatusFileSize
new2.07 KB
czigor’s picture

Status: Active » Needs review
StatusFileSize
new823 bytes

  • czigor committed a7f7d5b on 8.x-1.x
    Issue #3109228 by bdimaggio, czigor: PHP notices and then fatal error...
czigor’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.