Add support for Group 3.x

Created on 21 November 2024, 27 days ago

Problem/Motivation

When installing version 1.1.2 of this module, I get the following error when viewing the product overview.

Error: Class "Drupal\group\Entity\GroupContent" not found in _commerce_quick_node_clone_has_clone_permission() (line 53 of modules/contrib/commerce_quick_node_clone/commerce_quick_node_clone.module).

After a quick patch - based on issue #3306677 for Quick Node Clone Intercompatibility with Group module new versions Needs work -, I get another error:

TypeError: Drupal\group\Entity\GroupRelationship::loadByEntity(): Argument #1 ($entity) must be of type Drupal\Core\Entity\EntityInterface, null given, called in /var/www/html/web/modules/contrib/commerce_quick_node_clone/src/Controller/QuickNodeCloneNodeController.php on line 83 in Drupal\group\Entity\GroupRelationship::loadByEntity() (line 165 of modules/contrib/group/src/Entity/GroupRelationship.php).

Steps to reproduce

  1. Install Group 3.x
  2. Setup your group implementation
  3. Install the module as you would with any other
  4. Go to the products overview
  5. See the page is broken

Proposed resolution

Update the code, so Group 3.x is supported.
See patch below for an initial approach based on issue #3306677 for Quick Node Clone Intercompatibility with Group module new versions Needs work .

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

None.

🐛 Bug report
Status

Active

Version

1.1

Component

Code

Created by

🇧🇪Belgium blacksnipe

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

Comments & Activities

Production build 0.71.5 2024