Remove social_group_request_group_content_type_insert hook and place field_request_message config in optional

Created on 9 June 2024, 7 months ago
Updated 19 July 2024, 5 months ago

Problem/Motivation

We should remove Remove social_group_request_group_content_type_insert hook from social_group_request module, because:
1) This hook is incorrect since it creates the field without entity_type and field_name, which leads to problems with kernel tests
2) We don't want to create this field for each group_content type

Proposed resolution

So the underlying problem is that social_group_request is trying to be clever by automatically creating config for the fields.
This works if we install modules one-by-one using drush but it doesn't work well if we install the module during tests because these hooks may not fire.

We tried to be clever in the past because we initially had 4 group bundles that were different group types and we wanted to share behaviour between them.

Since then we've understood that that's not a maintainable solution and we want to have these kind of functionalities be opt-in (our only "group" type is now also flexible_group rather than open/public/closed/secret)

The solution is to remove the magic hook here and instead add the config files to config/optional in the different modules that support group requests (e.g. social_group_flexible_group, social_course, etc.). That way if social_group_request is enabled Drupal will automatically install the config at the right moment.

✨ Feature request
Status

Needs work

Version

13.0

Component

Code (back-end)

Created by

πŸ‡ΊπŸ‡¦Ukraine v.koval

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

Comments & Activities

Production build 0.71.5 2024