The "group_content_type" entity type does not exist error after upgrade from v2 to v3

Created on 16 December 2024, 2 days ago

After upgrading from group v2 to 3.3.2, I was getting this error:

The "group_content_type" entity type does not exist.

I tracked it down to the key_value table holding an outdated field definition for the group_relationship entity type. The type field was still configured to point to an entity type of "group_content_type".

This was happening when trying to delete a duplicate group_relationship bundle that was created during the upgrade.

This code solved the problem for me:

```
$field_def = \Drupal::entityDefinitionUpdateManager()->getFieldStorageDefinition("type", "group_relationship");
$field_def->setSetting("target_type", "group_relationship");
\Drupal::entityDefinitionUpdateManager()->updateFieldStorageDefinition($field_def);
```

🐛 Bug report
Status

Active

Version

3.3

Component

Code

Created by

🇨🇦Canada classiccut

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024