After updating Drupal from version
8.0.0-beta7 to version
8.0.x-dev — to fix
text_format fields not submitting their value due to a missing
name attribute —, my field is now displaying as a basic
input field with the format bar under it.
Here's the code that defines the
content field of my entity (inside the
$fields['content'] = BaseFieldDefinition::create('text') ->setLabel(t('Content')) ->setDescription(t('The content of the block')) ->setSettings(array( 'max_length' => 1024 )) ->setDisplayOptions('form', array( 'type' => 'text_format', 'weight' => -6 )) ->setRequired(TRUE) ->setDisplayConfigurable('form', TRUE);
As said above, this code works fine on the latest beta but breaks on the latest version from GitHub.
Expected result (8.0.0-beta7):
Obtained result (8.0.x-dev):
I'm guessing there's something I'm not doing right here, but after hours of searching, I just can't seem to understand what. I've tried changing the type passed to
string_long, too, but then I just get a
textarea with no format.