Problem/Motivation

In Drupal 11, modules that define custom field types must include a `MODULE_NAME.field_type_categories.yml` file to declare the categories used in their field type plugins. This module is missing this required file, causing a fatal error when accessing field configuration pages.

Steps to reproduce

1. Install audio_embed_field module on Drupal 11
2. Navigate to `/admin/structure/types/manage/[content-type]/fields/add-field`
3. Fatal error occurs preventing the page from loading

Proposed resolution

1. **Create `audio_embed_field.field_type_categories.yml`** - This file is completely missing and is mandatory in Drupal 11 for modules defining custom field types
2. **Fix the `@FieldType` annotation** - Remove `@Translation()` from the `category` property in `AudioEmbedField.php`

- The `category` property must reference a category ID defined in the YAML file
- The `category` property must be a plain string, not a TranslatableMarkup object
- Only the `label` and `description` in the YAML file should be translatable

CommentFileSizeAuthor
#3 3557649-field-type-categories.patch2.03 KBroxaneh
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

roxaneh created an issue. See original summary.

roxaneh’s picture

Issue summary: View changes
roxaneh’s picture

StatusFileSize
new2.03 KB
avpaderno’s picture

Status: Patch (to be ported) » Needs review

mably made their first commit to this issue’s fork.

avpaderno’s picture

Assigned: roxaneh » Unassigned

  • mably committed f447c4d2 on 8.x-2.x
    Issue #3557649 by roxaneh, mably: Missing field_type_categories.yml...
mably’s picture

Status: Needs review » Fixed

Chose the even simpler solution to just remove the category property from the field type definition.

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.

mably’s picture

Priority: Normal » Critical

Status: Fixed » Closed (fixed)

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