Problem/Motivation

The \Drupal\commerce_product\Plugin\Field\FieldWidget\ProductVariationAttributesWidget::formElement method invokes $product->getVariations() directly. However, in massageFormValues (and others) we invoke the loadEnabled method on the variation storage.

By not using this pattern in the formElement method we're generating attribute values which are invalid (and can mess up translations.)

Proposed resolution

Change formElement to use loadEnabled

Remaining tasks

User interface changes

API changes

Data model changes

Comments

mglaman created an issue. See original summary.

mglaman’s picture

Status: Active » Closed (won't fix)

Something is wrong with my code. We already have this.