Cannot remove all product attribute values

Created on 3 September 2024, 8 months ago

Describe your bug or feature request.

If a bug, provide steps to reproduce it from a clean install.

0. do not create any products
1. set up a "Packaging" product attribute
2. set default product variation to use this "Packaging" product attribute
3. /admin/commerce/product-attributes/manage/packaging Add these values to "Packaging" product attribute:
- 100 g
- 200 g
4. click save
5. click edit "Packaging" again
6. try to remove 100g, now just 200g is in the list
7. try to remove 200g, now for some reason the previously removed 100g reappeared in the list
8. click save, and this WSOD error happens:

Drupal\Core\Entity\EntityStorageException: Update existing 'commerce_product_attribute_value' entity while changing the ID is not supported. in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 817 of core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).

I think in step 7 the "100g" should not reappear in the list, instead a new empty element should be displayed, and saving the form that way should reload a form with a validation message.

πŸ› Bug report
Status

Active

Version

2.0

Component

Product

Created by

πŸ‡ΈπŸ‡°Slovakia kaszarobert

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

Comments & Activities

Production build 0.71.5 2024