Support group_content_string_id module on group_webform

Created on 9 November 2021, about 3 years ago
Updated 25 October 2023, about 1 year ago

Problem/Motivation

When the module is used with the patch on Entities identified by strings as group content Closed: won't fix it works as expected, but when used with the group_content_string_id (the recommended approach by the maintainer of the group module*), there is a fatal error when a non-administrator user tries to access to an individual group webform:
Error: Call to undefined method Drupal\group\Entity\GroupContent::getEntityFieldNameForEntityType() in Drupal\group_webform\GroupWebformService->webformAccess() (line 110 of modules/contrib/group_webform/src/GroupWebformService.php).

Steps to reproduce

  • Install group_taxonomy and group_content_string_id modules
  • Create a group, and add a user as member of that group
  • Add a webform to a group
  • Access to that webform

Proposed resolution

Avoid using the GroupContent::getEntityFieldNameForEntityType() function

Remaining tasks

  • Patch
  • Review
  • Test

User interface changes

None

API changes

- Patch on Entities identified by strings as group content Closed: won't fix is replaced by the group_content_string_id module

Data model changes

- entity_id_str column in the group_conent_field_data table is removed
- entity_id column in the group_conent_field_data table now a varchar field
- Both changes are managed by the group_content_string_id module

Notes

* See https://www.drupal.org/project/group/issues/2797793#comment-14149767 Entities identified by strings as group content Closed: won't fix

Feature request
Status

Needs review

Version

1.0

Component

Code

Created by

🇪🇸Spain akalam

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024