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:
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 3537641-social_group_flexible_group_update_130003.beta1_.patch | 1.17 KB | christian.wiedemann |
Issue fork social-3537641
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:
- 3537641-social_group_flexible_group_update_130003
changes, plain diff MR !84
Comments
Comment #3
christian.wiedemann commentedComment #4
christian.wiedemann commentedComment #5
christian.wiedemann commentedComment #6
socialnicheguru commentedIs this an upstream issue that should be addressed in group 2?The MR is the way to go
Comment #7
christian.wiedemann commentedComment #8
kingdutchhttps://git.drupalcode.org/project/social/-/commit/6255f0aedecb2d6eabd79...
Tagged as 13.0.2