I have 2 different product variation types. On the VADO form there are checkboxes for those 2 types + "default".

These lines try to get the relevant entity form display for the selected product variation types:

 $display = $this->entityTypeManager->getStorage('entity_form_display')
            ->load('commerce_product_variation.' . $value . '.default');

This always fails when selecting a non-default value.

Error: Call to a member function setComponent() on null in Drupal\commerce_vado\Form\VadoManagementForm->submitForm() (line 170 of modules/contrib/commerce_vado/src/Form/VadoManagementForm.php).

$this->entityTypeManager->getStorage('entity_form_display')->loadMultiple() returns only one product variation: commerce_product_variation.default.default. I can't yet tell if this is by design or there is some other problem.

Related: #3025421: Make added fields visible by default

Comments

imclean created an issue. See original summary.

tonytheferg’s picture

This was addressed in the latest release. Thanks for the post!

tonytheferg’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.