TypeError: Drupal\Core\Field\FieldTypeCategory::getDescription() Return value must be of type Drupal\Core\StringTranslation\TranslatableMarkup

Created on 8 January 2024, 6 months ago
Updated 6 February 2024, 5 months ago

Problem/Motivation

Going to add a field to a content type with a DOI field produces the following error:

TypeError: Drupal\Core\Field\FieldTypeCategory::getDescription(): Return value must be of type Drupal\Core\StringTranslation\TranslatableMarkup, string returned in Drupal\Core\Field\FieldTypeCategory->getDescription()

This appears to be because there is no description in the annotation of DoiFieldItem.

See https://www.drupal.org/project/drupal/issues/3409413 πŸ› Error TypeError: Drupal\Core\Field\FieldTypeCategory::getDescription() if a FieldType has 'description' missing in its annotation RTBC

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom Leo Pitt

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024