Problem/Motivation
Problem:
When navigating to the "Add field" UI page (/admin/structure/types/manage/{bundle}/fields/add-field), the site throws a fatal AssertionError and shows a white screen:
AssertionError: "interactive" must be defined in MODULE_NAME.field_type_categories.yml
in Drupal\Core\Field\FieldTypePluginManager->getGroupedDefinitions()Root cause:
The EmojiReactionItem field type plugin declares category = "interactive" in its @FieldType annotation (EmojiReactionItem.php line 31), but the module ships no emoji_reactions.field_type_categories.yml file to register that category with Drupal's FieldTypeCategoryManager.
Since Drupal 10.1, every category referenced by a field type must be declared in a MODULE_NAME.field_type_categories.yml file. Without it, FieldTypePluginManager::getGroupedDefinitions() (line 183) asserts FALSE and crashes.
Fix:
Add the file emoji_reactions.field_type_categories.yml to the module root:
interactive:
label: 'Interactive'
description: 'Fields that provide interactive user engagement features.'
weight: 10
Steps to reproduce
- Install the emoji_reactions module.
- Go to any content type → Manage fields → Add field.
- The page crashes with the AssertionError above.
Drupal core version: 10.1+
PHP version: Any
Module version: (1.0.0)

| Comment | File | Size | Author |
|---|---|---|---|
| AssertionError.png | 444.46 KB | mugesh.s |
Issue fork emoji_reactions-3593452
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
Comment #3
mugesh.s commentedHi @Sujan Shrestha, please review the MR.
Comment #4
mugesh.s commentedComment #5
sujan shrestha commentedHi @mugesh.s, thanks for your help with this. I have merged the MR into the 1.0.x dev branch and also updated the module documentation to reflect the new category structure. Please check with the dev branch and let me know if the issue still exists!
Comment #6
mugesh.s commented@Sujan Shrestha, thanks for the update. I checked the dev branch, and the issue has been fixed now. Thanks for updating the documentation as well.
Comment #7
mugesh.s commentedComment #8
mugesh.s commentedComment #9
sujan shrestha commented