Support group_content_string_id module on group_taxonomy

Created on 9 November 2021, about 3 years ago
Updated 24 April 2023, over 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 the taxonomy overview page of a group:
Drupal\Core\Entity\Query\QueryException: 'entity_id_str' not found in Drupal\Core\Entity\Query\Sql\Tables->ensureEntityTable() (line 368 of core/lib/Drupal/Core/Entity/Query/Sql/Tables.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
  • Access to /group/[ID]/taxonomy

Proposed resolution

The error is thrown because the entity_id_str field does not exist in the database. Load the group content by using the entity_id instead.

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