Problem/Motivation

In Drupal 11 when the Ingredient submodule is installed attempting to add a new field on any content entity type results in a WSoD with the following error:

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

The reason is a change to field type annotations/attributes. Translated categories were deprecated in 10.2.0 and removed from 11.0.0

Coincidentally, this was reported to me only a day or two before this bug report was made by a colleague who was using the Ingredient reference field as a template for custom work.

Proposed resolution

Change the Ingredient field type category to "reference" to match EntityReferenceItem.

Issue fork recipe-3505204

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

venge created an issue. See original summary.

dcam’s picture

Status: Fixed » Active
dcam’s picture

Version: 8.x-2.2 » 8.x-2.x-dev
Priority: Minor » Critical
Issue summary: View changes
dcam’s picture

Title: Bug when trying to add a new field in Ingredients » Do not translate the Ingredient field type category

  • dcam committed 93f176d9 on 8.x-2.x
    Issue #3505204 by dcam: Do not translate the Ingredient field type...
dcam’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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