TypeError: Argument 1 passed to Drupal\commerce_bulk\BulkVariationsCreator::getProductVariation() must be an instance of Drupal\commerce_product\Entity\Product, instance of Drupal\commerce_bulk\Entity\BulkProductVariation given, called in .\modules\commerce_bulk\commerce_bulk.module on line 171 in Drupal\commerce_bulk\BulkVariationsCreator->getProductVariation() (line 105 of ..\modules\commerce_bulk\src\BulkVariationsCreator.php)

Comments

drugan created an issue. See original summary.

  • drugan committed a859437 on 8.x-1.x
    Issue #3009439: Crash when editing variation on the Variations tab
    
drugan’s picture

Status: Active » Fixed

Just a quick fix to prevent error. Unfortunately, the actual functionality of the bulk variation creator is broken by introducing the Variations tab:

#2901939: Move the variations form to its own tab next to (Product) Edit

Needs work to restore the bulk creation functionality.

  • drugan committed f4272b4 on 8.x-1.x
    Issue #3009439 by drugan: Crash when editing variation on the Variations...
drugan’s picture

How to restore the old style add / edit variations using IEF on a product add / edit form:

  1. Update the module to the latest dev or alpha version.
  2. go to admin/commerce/config/product-types/YOUR_PRODUCT_TYPE/edit/form-display and enable Variations field with Inline entity form - Complex widget.
  3. !important: check Override labels box and set up singular / plural labels.
  4. go to admin/commerce/config/product-variation-types/YOUR_PRODUCT_TYPE_VARIATION_TYPE/edit/form-display and enable attributes fields.

Status: Fixed » Closed (fixed)

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