Bug when trying to add a new field in Ingredients

Created on 7 February 2025, 16 days ago

Problem/Motivation

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

Proposed resolution

Tox fix it create recipe.field_type_categories.yml in recipe module root containing:
Reference:
label: 'Reference'

In recipe\modules\ingredient\src\Plugin\Field\FieldType\IngredientItem.php
Change line 19 :
* category = @Translation("Reference"),
with :
* category = "Reference",

That seems to solve the problem in my case. I'm just pointing it out in case it might help someone else.

πŸ› Bug report
Status

Fixed

Version

2.2

Component

Code

Created by

πŸ‡«πŸ‡·France Waen

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024