-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Catalog Module UpgradeData to 2.1.3 breaks when cost attribute is deleted #7804
Comments
Internal jira ticket - MAGETWO-62266 created. |
I am having the exact same problem...
|
@AirmanAJK can you tell me how I can get around this for now? thanks! |
@AirmanAJK I just removed cost in the array on line 371 of UpgradeData.php and ran the upgrade again and was able to get by for now... is this the same as what you did? will this have any consequence? |
@jvreeken That's exactly right. This will not have any consequences assuming you deleted the cost attribute (which I'm sure you did since it crashed in the first place). I'm not aware of any other part of Magento that requires a cost attribute to function. |
Hey , Then pls check the attribute_id of the "cost" and use it for creating another table entry in "catalog_eav_attribute" by using the query INSERT INTO pls use the attribute_id of cost instead of 81 . the run the setup upgrade hope it will work fine. Thanks |
…ttribute is deleted #7804 - for 2.2.0
Bugs - MAGETWO-65308 CLI command config:set fails on configurations which requires session - MAGETWO-62560 Catalog Module UpgradeData to 2.1.3 breaks when cost attribute is deleted #7804 - for 2.2.0 Task - MAGETWO-65208 Store checksum for every section of configuration file & change behavior on read-only FS & add sorting of importers
This issue was fixed in develop branch, |
@AirmanAJK, thank you for your report. |
I just updated from CE 2.1.2 to CE 2.1.3
Upon running setup:upgrade, I received an error message on the command line:
Notice: Undefined index: attribute_id in /var/www/magento2/public_html/vendor/magento/module-catalog/Setup/UpgradeData.php on line 375.
This line of code occurs in a loop that attempts to update several attributes to a global scope. The attributes to be updated are: price, cost, and special_price.
The problem is that cost is a user-defined attribute, and I deleted it a long time ago. The loop should ensure that the attribute exists before attempting to update it.
The information I've provided should be more than enough to recognize the issue without even testing it:
'cost' is a user-defined attribute and can be deleted at will.
'cost' has a hardcoded update in an UpgradeData.php file.
Please don't ask me to edit this to conform to Magento's bug report conventions. I spent enough time getting this upgrade to work and tracking this bug down. I will not respond and this easy fix will be closed after 2 weeks due to no replies.
The text was updated successfully, but these errors were encountered: