Problem/Motivation

The update hook social_group_flexible_group_update_130003 fails if Socal\Group has a subclass and this sub class is set in entity type alter.

Steps to reproduce


namespace Drupal\mkat_group\Entity;

use Drupal\social_group\Entity\Group as SocialGroup;

/**
 * Bundle class for groups.
 */
class Group extends SocialGroup {
...
}

Proposed resolution

Use


\Drupal::entityTypeManager()->getStorage('group')->load($item->gid); 

Instead of

Group::load($item->gid);

in social_group_flexible_group_update_130003

There is a similar issue in drupal core:

https://www.drupal.org/project/drupal/issues/3127026

Issue fork social-3537641

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

christian.wiedemann created an issue. See original summary.

christian.wiedemann’s picture

Status: Active » Needs review
christian.wiedemann’s picture

Issue summary: View changes
christian.wiedemann’s picture

Issue summary: View changes
socialnicheguru’s picture

Is this an upstream issue that should be addressed in group 2?

The MR is the way to go

christian.wiedemann’s picture

kingdutch’s picture

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.