Problem/Motivation

When I try to add a field to any entity type's bundle, I get this error:

AssertionError: "Field" must be defined in MODULE_NAME.field_type_categories.yml in assert() (line 195 of core/lib/Drupal/Core/Field/FieldTypePluginManager.php).

This seems to be caused by Patternkit's custom field named "Serialized field data".

Steps to reproduce

- Configure PHP's assert.active to be enabled, so that failed assert() calls throw exceptions.
- Install Drupal core 10.3 using Standard profile
- Install Patternkit 9.1.0-beta10
- Log in as admin
- Try to add a field to "Basic page" content type.
- Notice that you get the above-listed message (you may see it printed on the page or in the logs).

Proposed resolution

Remove the "Field" category from Patternkit's custom field, because this category does not exist.

Issue fork patternkit-3489271

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

krisahil created an issue. See original summary.

krisahil’s picture

Status: Needs work » Needs review
krisahil’s picture

StatusFileSize
new550 bytes

The MR is against latest 9.1.x. Here's a patch against release 9.1.0-beta10.

slucero’s picture

Status: Needs review » Reviewed & tested by the community
Parent issue: » #3468609: Patternkit 1.0 Release Plan

I was able to both reproduce this and confirm the fix. Good find and thanks for the fix!

  • slucero committed 5748c761 on 9.1.x authored by krisahil
    Issue #3489271 by krisahil: AssertionError when trying to add a field to...
slucero’s picture

Status: Reviewed & tested by the community » Fixed

Merged for inclusion in the 1.0. release.

Status: Fixed » Closed (fixed)

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