cancel
Showing results for 
Search instead for 
Did you mean: 

Weight attribute disappears from product admin after installing a module

SOLVED

Weight attribute disappears from product admin after installing a module

I am running Magento 2.1.1 and have successfully migrated my Magento 1.9.2.4 data. However, I am running into an issue when trying to install a module that introduces a new product type.

 

I have installed two different gift card modules and both times, the product weight attribute disappears from every type of product except the gift card type. It is still in all of the attribute groups, it just doesn't show up in the product listing and if I save a product, it is converted from a simple product to a virtual product as a result. 

 

When I uninstall the module, the problem does not go away. I have to reinstall Magento 2 and re-migrate all of my Magento 1 data.  Any help identifying the problem would be greatly appreciated. Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Weight attribute disappears from product admin after installing a module

**Solved**

 

After migration from magento 1, our apply_to value for the weight attribute on catalog_eav_attribute is null. Part of the code in the extension added a new product type and since the eav attribute was null in the database, the weight was not applied to the other product types. So we updated the apply_to to include the other applicable product types and now everything is working.

 

mysql> select attribute_id, frontend_input_renderer, apply_to from catalog_eav_attribute where attribute_id = 80;


80 | Magento\Catalog\Block\Adminhtml\Product\Helper\Form\Weight           | ,aw_giftcard


mysql> update catalog_eav_attribute set apply_to = 'aw_giftcard,simple,virtual,bundle,downloadable,configurable' where attribute_id = 80;


80 | Magento\Catalog\Block\Adminhtml\Product\Helper\Form\Weight           | aw_giftcard,simple,virtual,bundle,downloadable,configurable

View solution in original post

2 REPLIES 2

Re: Weight attribute disappears from product admin after installing a module

Hi @knvanderkooy,

 

It's a little bit hard because is not a native module and you're not saying which modules are those.

Maybe you can try to ask for support (if modules were paid).

 

Re: Weight attribute disappears from product admin after installing a module

**Solved**

 

After migration from magento 1, our apply_to value for the weight attribute on catalog_eav_attribute is null. Part of the code in the extension added a new product type and since the eav attribute was null in the database, the weight was not applied to the other product types. So we updated the apply_to to include the other applicable product types and now everything is working.

 

mysql> select attribute_id, frontend_input_renderer, apply_to from catalog_eav_attribute where attribute_id = 80;


80 | Magento\Catalog\Block\Adminhtml\Product\Helper\Form\Weight           | ,aw_giftcard


mysql> update catalog_eav_attribute set apply_to = 'aw_giftcard,simple,virtual,bundle,downloadable,configurable' where attribute_id = 80;


80 | Magento\Catalog\Block\Adminhtml\Product\Helper\Form\Weight           | aw_giftcard,simple,virtual,bundle,downloadable,configurable