Problem/Motivation

When I try to add a new field in a content type, an error occurs.

Steps to reproduce

1: Install the "Constant Contact Module" using the following command:
composer require 'drupal/ik_constant_contact:^4.1'

2: Add a new field to any content type.

3: The following error appears:

AssertionError: "Constant Contact" must be defined in MODULE_NAME.field_type_categories.yml in assert() (line 183 of core\lib\Drupal\Core\Field\FieldTypePluginManager.php).

Note : I am using Drupal 11 with PHP 8.3.13 version.

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

aman_lnwebworks created an issue. See original summary.

rosemaryreilman’s picture

Assigned: Unassigned » rosemaryreilman

rosemaryreilman’s picture

Status: Active » Needs review

New Drupal API Changes: New API for defining field type categories

I added a new MR that you can use the changes to see if that fixes your issue.

rosemaryreilman’s picture

Status: Needs review » Fixed

Created 4.2.0 for this and a few other bug fixes

aman_lnwebworks’s picture

Status: Fixed » Needs review

Hi @rosemaryreilman

I have applied your solution.

- First I created a new file "ik_constant_contact.field_type_categories.yml" and added the below code in this file

constant_contact:
  label: "Constant Contact"
  description: "Fields associated with Constant Contact service."
  weight: -10
  libraries: {}

But issue is not resolved

aman_lnwebworks’s picture

Status: Needs review » Needs work
aman_lnwebworks’s picture

StatusFileSize
new88.26 KB
new45.87 KB

I @rosemaryreilman

I have upgraded the module with a new release version 4.2.0 but the issue still showing.

i have added screenshots please review it once.

rosemaryreilman’s picture

Status: Needs work » Needs review

I created a new MR. I forgot to change the category value in the FieldType file. Let me know if that helps.

aman_lnwebworks’s picture

Hi @rosemaryreilman

I have updated category = "constant_contact" in the src/Plugin/Field/FieldType/ConstantContactListItem.php file .

Now the issue has been fixed.

Thank you !!

rosemaryreilman’s picture

Status: Needs review » Fixed

Fix is in new release 4.2.1

rosemaryreilman’s picture

Status: Fixed » Closed (fixed)