d11 clean install throws AssertionError: "Reference" must be defined in MODULE_NAME.field_type_categories.yml in assert()

Created on 9 September 2024, 3 months ago
Updated 13 September 2024, 2 months ago

Problem/Motivation

Drupal 11 appears to be incompatible with Entity Reference Hierarchy 3.x and 5.x. An attempt to add a field to a content type in each of these two versions throws the following error:

AssertionError: "Reference" must be defined in MODULE_NAME.field_type_categories.yml in assert() (line 183 of /var/www/html/web/core/lib/Drupal/Core/Field/FieldTypePluginManager.php).

The error does not occur with Drupal 10.3.

Steps to reproduce

  1. composer create-project drupal-composer/drupal-project:11.x-dev d11-erhierarchy --no-interaction
  2. cd d11-erhierarchy
  3. drush si
  4. composer require 'drupal/entity_hierarchy:^3.3'
  5. grep -ri previousnext/nested-set
  6. drush si
  7. drush en entity_hierarchy -y
  8. drush cr
  9. visit /admin/structure/types/manage/article/fields/add-field
  10. note error

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

3.0

Component

Code (module)

Created by

🇺🇸United States kay_v

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

Comments & Activities

Production build 0.71.5 2024