GroupStatistics::count() Does not work for hashed content types

Created on 21 July 2022, over 2 years ago
Updated 11 November 2024, 4 days ago

Problem/Motivation

The groups module hashes the content-type if the combination group type ID and the entity type ID is too long.

The current implementation of GroupStatistics::count() does not take care of that.

Steps to reproduce

Create a group type with long machine name - the member count and other content counters wont work.

Proposed resolution

Use

$group->getGroupType()->getContentPlugin($type)->getContentTypeConfigId()

instead of

$group->getGroupType()->id() . '-' . $type

Remaining tasks

None

User interface changes

None

API changes

None

Data model changes

None

🐛 Bug report
Status

Needs review

Version

12.4

Component

Code (back-end)

Created by

🇩🇪Germany Harlor Berlin

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