Skip to content

Catalog Module UpgradeData to 2.1.3 breaks when cost attribute is deleted #7804

Closed
@AirmanAJK

Description

@AirmanAJK

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fixed in 2.2.xThe issue has been fixed in 2.2 release lineIssue: Format is not validGate 1 Failed. Automatic verification of issue format is failedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.1.xThe issue has been reproduced on latest 2.1 releasebug report

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions