Plugins with hashed plugin IDs not converted properly when upgrading from v2 to v3

Created on 22 November 2024, 6 months ago

Problem/Motivation

Running the update hooks to go from Group 2.3.1 to Group 3.3.1 does not properly convert all config files (e.g., a content type that is enabled as group content and has a long node type machine name). If the plugin machine name is hashed (group_content_type_ade1280ef52b1) when the update hooks have been created, the config files and entity plugins and such are not properly renamed. Not only is the machine name left the same but you are no longer able to access the "Set Available Content" UI page (at /admin/group/types/manage/my_group_type/content) as an error is thrown because the config for that plugin is still group_content and not group_relationship.

TypeError: field_ui_entity_operation(): Argument #1 ($entity) must be of type Drupal\Core\Entity\EntityInterface, null given, called in /var/www/html/web/modules/contrib/group/src/Plugin/Group/RelationHandlerDefault/OperationProvider.php on line 78 in field_ui_entity_operation() (line 133 of core/modules/field_ui/field_ui.module).

Steps to reproduce

  1. Clean Drupal install, enable Group 2.3.1
  2. Add a content type with a longer machine name
  3. Enable that node type as a group content type
  4. Export config
  5. composer require drupal/group:^3
  6. drush updb
  7. Export config
  8. Visit the "Set Available Content" page for your group type
  9. Error
πŸ› Bug report
Status

Active

Version

3.3

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States scotwith1t Birmingham, AL

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024