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
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 3557649-field-type-categories.patch | 2.03 KB | roxaneh |
Issue fork audio_embed_field-3557649
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 #2
roxaneh commentedComment #3
roxaneh commentedComment #4
avpadernoComment #6
avpadernoComment #9
mably commentedChose the even simpler solution to just remove the category property from the field type definition.
Comment #11
mably commented