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

  1. Install the emoji_reactions module.
  2. Go to any content type → Manage fields → Add field.
  3. The page crashes with the AssertionError above.

Drupal core version: 10.1+
PHP version: Any
Module version: (1.0.0)

CommentFileSizeAuthor
AssertionError.png444.46 KBmugesh.s
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

mugesh.s created an issue. See original summary.

mugesh.s’s picture

Status: Active » Needs review
Issue tags: +Needs tests

Hi @Sujan Shrestha, please review the MR.

mugesh.s’s picture

Issue summary: View changes
sujan shrestha’s picture

Hi @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!

mugesh.s’s picture

@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.

mugesh.s’s picture

Status: Needs review » Reviewed & tested by the community
mugesh.s’s picture

Issue tags: -Needs tests
sujan shrestha’s picture

Version: 1.0.0 » 1.0.1
Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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