Drupal Answers Asked by wilburunion on November 5, 2021
Drupal 8 – Commerce 2 has its import from Ubercart now in the Commerce Migrate module. Field text data was left behind, and it is its own issue – see below
At admin/commerce/config/product-variation-types for what did import was the product types and products themselves, and if I try to edit the imported "Product", Product_kit" or "uc_recurring" variation to make it shippable with dimensions a Runtime Exception error is thrown that no "dimension" or "weight" field exists.
RuntimeException: The field "dimensions" does not exist on bundle "product" of entity type "commerce_product_variation". in DrupalcommerceConfigurableFieldManager->hasData() (line 119 of modules/commerce/src/ConfigurableFieldManager.php).
DrupalcommerceEntityTraitManager->canUninstallTrait(Object, ‘commerce_product_variation’, ‘product’) (Line: 77) . . . . more (for Product)
and
RuntimeException: The field "weight" does not exist on bundle "product_kit" of entity type "commerce_product_variation". in DrupalcommerceConfigurableFieldManager->hasData() (line 119 of modules/commerce/src/ConfigurableFieldManager.php).
DrupalcommerceEntityTraitManager->canUninstallTrait(Object, ‘commerce_product_variation’, ‘product_kit’) (Line: 77) . . . . more (for Product_kit)
For "uc_recurring" it throws the first one listed.
I did try adding the fields at /admin/commerce/config/product-variation-types/product_kit/edit/fields it took them for "products" but stated duplicates could not be used for the others, so I stopped.
However, with Devel / product generate it does not work. The default variation works fine, but these are tied to the imported products and I personally don’t know what to edit to add the missing values to get the form to work and the only way to try now anything else is to start over with a new database and import again via upgrade using Commerce Migrate – which never worked right in the first place – because it left the text data field behind and is a bug it appears in in itself.
See https://www.drupal.org/project/commerce_migrate/issues/3044987.
Reference https://docs.drupalcommerce.org/commerce2/user-guide/shipping/enable-shipping-products
Does anyone know if there is a way to manually add these fields to these entities or otherwise fix this ??
A patch and code insert posted at comment 14 and 15 at https://www.drupal.org/project/commerce_migrate/issues/3044987 partially solved this but for the text data field import still did not work to bring in the text
Answered by wilburunion on November 5, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP