Breaks commerce variant duplication if reacting on product type

Created on 3 January 2024, 12 months ago

Problem/Motivation

I have a CSS rule that reacts on Commerce product type. When I try to duplicate a product variation (core Commerce feature), I get an error and the process fails. Disabling the rule fixes the issue.

The error is as follows: When trying to duplicate a variation, I get the following error and the process fails:
Error: Call to a member function bundle() on string in Drupal\Core\Entity\Plugin\Condition\EntityBundle->evaluate() (line 92 of /var/www/***/core/lib/Drupal/Core/Entity/Plugin/Condition/EntityBundle.php).

Steps to reproduce

- Install drupal Commerce
- Create a CSS Asset Injector rule that reacts on the default product type
- Create a default product
- Add a variation
- Attempt to duplicate the variation - Site crashes.
- Disable the rule
- Try to duplicate the variation again, this time it will work

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇹🇭Thailand AlfTheCat

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

Comments & Activities

Production build 0.71.5 2024