AnswerBun.com

Runtime Exception - no weight or dimension field after importing

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 ??

One Answer

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

Add your own answers!

Related Questions

How can I rebuild an image field with values in an Ajax callback?

1  Asked on December 17, 2020 by wassim-akermi

     

Breadcrumb/block settings

3  Asked on December 17, 2020 by zach

       

Change can I programmatically change the format of a view?

2  Asked on December 16, 2020 by user78498

   

How do I create a conditional form field?

2  Asked on December 15, 2020 by sean

 

I need to reference a custom field I created in User Profile

1  Asked on December 15, 2020 by user17021

     

How to use the uc_csv module for getting reports

1  Asked on December 15, 2020 by sathish

     

CKEditor displays entire site page when rich text is switched on

1  Asked on December 13, 2020 by amit-sedai

 

How do I get the video media path in a theme?

1  Asked on December 12, 2020 by mrfox

 

drush cannot update commerce kickstart

1  Asked on December 9, 2020 by ckosloff

   

How to add a javascript function after uploading file

2  Asked on December 9, 2020 by ahmed

   

Creating date field with only month and year

2  Asked on December 8, 2020 by blaine-lang

   

submitForm() isn’t called

1  Asked on December 7, 2020 by dylhof

     

Get the uri/path value of an image in the field template

2  Asked on December 7, 2020 by flamesquirrel

       

User registration silently fails – how to debug?

1  Asked on December 5, 2020 by druvision

     

How can I automatically flag new comments?

1  Asked on December 5, 2020 by sdfff

       

Ask a Question

Get help from others!

© 2023 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP