My magento current version is 2.1.2 and upgraded with Composer by following command:
composer require magento/product-community-edition 2.1.3 --no-update
composer update
php bin/magento cache:clean
php bin/magento cache:flush
php bin/magento setup:upgrade
I'm getting following error while run command php bin/magento setup:upgrade
[Exception]
Notice: Undefined index: attribute_id in vendor\magento\module-catalog\Setup\UpgradeData.
php on line 375
Please help me for solve this error.
Best Answer
Your error comes from this method:
The feasible issue is the absence of the attribute from the list
['price', 'cost', 'special_price']
in your system. Maybe you’ve deleted one of them?You can find all of them in the table
eav_attribute
usin the query:You should see something similar to this:
If you want to restore your cost attribute use this query: