Problem/Motivation
When trying to add a new field on Drupal 11.3 I see the following error
AssertionError: "Slug" must be defined in MODULE_NAME.field_type_categories.yml in assert() (line 183 of /Users/andy/Sites/bhcclocalgov/docroot/core/lib/Drupal/Core/Field/FieldTypePluginManager.php).
Additionally, I see this error once adding the correct file.
TypeError: Cannot access offset of type Drupal\Core\StringTranslation\TranslatableMarkup in isset or empty in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 45 of /Users/andy/Sites/bhcclocalgov/docroot/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).
Steps to reproduce
- Make sure PHP assertions are on.
- Install entity_slug
- Go to a content type
- try to add a new field
- See error
Proposed resolution
Add the entity_slug.field_type_categories.yml file and change the field categories to not use translation.
Issue fork entity_slug-3612552
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
andybroomfield