Exception: Invalid field category for field type: "entity_reference_hierarchy", category must be the ID of a defined field category, got "Reference". in Drupal\field_ui\Form\FieldStorageAddForm->processFieldDefinitions() (line 136 of /app/docroot/core/mod

Created on 16 January 2025, 10 days ago

Problem/Motivation

After installing module (3.3.11) on Drupal 11.0.10, and try to "Create new field" on any content type I got error
"Exception: Invalid field category for field type: "entity_reference_hierarchy", category must be the ID of a defined field category, got "Reference". in Drupal\field_ui\Form\FieldStorageAddForm->processFieldDefinitions() (line 136 of /app/docroot/core/modules/field_ui/src/Form/FieldStorageAddForm.php)."

Steps to reproduce

1. Install module
2. Go to "Manage fields" (any content type)
3. Click on "Create new field" you got WOS

NOTE: Default message in watchdog was
"TypeError: Cannot access offset of type Drupal\Core\StringTranslation\TranslatableMarkup in isset or empty in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 45 of /app/docroot/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php)."

But after applying patch from https://www.drupal.org/project/drupal/issues/3475505 🐛 Changes in site building process can run into Cannot access offset of type StringTranslation\TranslatableMarkup on field creation path Active (https://git.drupalcode.org/project/drupal/-/merge_requests/10556/diffs.p...)
The error is "Exception: Invalid field category for field type: "entity_reference_hierarchy", category must be the ID of a defined field category, got "Reference". in Drupal\field_ui\Form\FieldStorageAddForm->processFieldDefinitions() (line 136 of /app/docroot/core/modules/field_ui/src/Form/FieldStorageAddForm.php)."

🐛 Bug report
Status

Active

Version

3.0

Component

Code (module)

Created by

🇷🇸Serbia rakun

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

Comments & Activities

Production build 0.71.5 2024