Error while adding member/product in Drupal commerce product group

Created on 2 February 2025, about 1 month ago

Problem/Motivation

Error while adding member/product in Drupal commerce product group

Steps to reproduce

on user interface
1. Commerce -> Product groups -> TestGroup -> Members -> Add member -> search a user, Role=customer, Save -> "The website encountered an unexpected error. Try again later."
Go back to TestGroup page, new member didn't added.

2. Commerce -> Product groups -> TestGroup -> Products -> Add existing products -> search a product, Save -> "The website encountered an unexpected error. Try again later."
But go back to TestGroup page, new product was added successful.

Log message
"TypeError: Exception::__construct(): Argument #2 ($code) must be of type int, string given in Exception->__construct() (line 83 of /var/www/html/web/modules/contrib/commerceg_product_group/src/Membership/Manager.php)."

"Drupal\Core\Entity\EntityStorageException: The group customer group role does not exist on the commerceg_products group type. in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 817 of /var/www/html/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php)."

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

2.0

Component

User interface

Created by

🇹🇼Taiwan ken lin

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024