magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.58k stars 9.32k forks source link

Magento 2.2.6 Update Removes Manufacturer Attribute from Product Edit Page #19716

Closed nickpiro closed 5 years ago

nickpiro commented 5 years ago

Preconditions

Magento 2.2.5 - Manufacturer Attribute visible in product edit page on Magento backend!

Steps to reproduce

Upgrade to Magento 2.2.6

Expected result

Manufacturer attribute still visible in product edit page on Magento backend!

Actual result

No Manufacturer attribute on product edit page on Magento backend!

magento-engcom-team commented 5 years ago

Hi @nickpiro. Thank you for your report. To help us process this issue please make sure that you provided the following information:

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento-engcom-team give me $VERSION instance

where $VERSION is version tags (starting from 2.2.0+) or develop branches (for example: 2.3-develop). For more details, please, review the Magento Contributor Assistant documentation.

@nickpiro do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?

magento-engcom-team commented 5 years ago

Hi @TomashKhamlai. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

TomashKhamlai commented 5 years ago

@magento-engcom-team give me 2.2.5 instance

magento-engcom-team commented 5 years ago

Hi @TomashKhamlai. Thank you for your request. I'm working on Magento 2.2.5 instance for you

magento-engcom-team commented 5 years ago

Hi @TomashKhamlai, here is your Magento instance. Admin access: https://i-19716-2-2-5.instances.magento-community.engineering/admin Login: admin Password: 123123q Instance will be terminated in up to 3 hours.

TomashKhamlai commented 5 years ago

@magento-engcom-team give me 2.2.6 instance

magento-engcom-team commented 5 years ago

Hi @TomashKhamlai. Thank you for your request. I'm working on Magento 2.2.6 instance for you

magento-engcom-team commented 5 years ago

Hi @TomashKhamlai, here is your Magento instance. Admin access: https://i-19716-2-2-6.instances.magento-community.engineering/admin Login: admin Password: 123123q Instance will be terminated in up to 3 hours.

TomashKhamlai commented 5 years ago

I cannot reproduce this issue.

Steps to reproduce:

  1. Get Magento Metapackage composer create-project --repository=https://repo.magento.com/ magento/project-community-edition:2.2.5 .
  2. Install Magento. I prefer to do this from the CLI:
    php bin/magento setup:install --backend-frontname="admin" --db-host="127.0.0.1" --db-name="magento225" --db-user="root" --admin-user="admin" --admin-password="123123q" --admin-email="earthworm.jim@gmail.com" --admin-firstname="Jim" --admin-lastname="Earthworm" --base-url="http://magento-composer.loc/" --cleanup-database --use-rewrites 1 && php bin/magento indexer:reindex && php bin/magento cache:flush
  3. Login to Admin
  4. Navigate to Stores > Attributes > Product
  5. Add 2 options to the attribute
  6. Navigate to Stores > Attributes > Attribute Set
  7. Modify Default attribute set to have manufacturer attribute saved in the Default attribute set
  8. Create new attribute set based on Default
  9. Perform required operations: php bin/magento indexer:reindex php bin/magento cache:flush
  10. Create 1 Simple and 1 Configurable product per attribute set.
  11. Let uninstall some bundles because of #18248. Also bundles are not listed in this repository. Composer documentation has good article about this https://getcomposer.org/doc/04-schema.md#replace
    "replace": {
        "temando/module-shipping-m2": "*",
        "dotmailer/dotmailer-magento2-extension": "*",
        "shopialfb/facebook-module": "*",
        "klarna/module-kp": "*",
        "klarna/module-ordermanagement": "*",
        "klarna/module-core": "*",
        "amzn/amazon-pay-sdk-php": "*",
        "amzn/amazon-pay-and-login-with-amazon-core-module": "*",
        "amzn/login-with-amazon-module": "*",
        "amzn/amazon-pay-module": "*",
        "vertex/module-tax": "*"
    },

    For example:

    ...
            "Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/"
        }
    },
    "minimum-stability": "stable",
    "replace": {
        "temando/module-shipping-m2": "*",
        "dotmailer/dotmailer-magento2-extension": "*",
        "shopialfb/facebook-module": "*",
        "klarna/module-kp": "*",
        "klarna/module-ordermanagement": "*",
        "klarna/module-core": "*",
        "amzn/amazon-pay-sdk-php": "*",
        "amzn/amazon-pay-and-login-with-amazon-core-module": "*",
        "amzn/login-with-amazon-module": "*",
        "amzn/amazon-pay-module": "*",
        "vertex/module-tax": "*"
    },
    "repositories": [
        {
            "type": "composer",
    ...
  12. Do composer update && php bin/magento setup:upgrade
  13. Login to Admin
  14. Go to System > Tools > Web Setup Wizard
  15. Upgrade to Magento 2.2.6.
  16. Login to Admin
  17. Check the products
nickpiro commented 5 years ago

This shouldn't be closed. I installed a vanilla version of 2.2.5 and upgraded to 2.2.6 and also had the error.

TomashKhamlai commented 5 years ago

@nickpiro please, add more details or try to follow my steps. I am asking for more details because there is an issue with bundle extensions while upgrading from this version. At least I do not know the way you managed to work with this issue. Also I should identify that the problem comes from Magento and not from one of the bundled extensions. Will you add more information?

TomashKhamlai commented 5 years ago

As I can see you already know about #18134. It is hard to imagine that there is a problem that one cannot upgrade because of an attribute and other get Magento upgraded but an attribute doesn't exist after upgrade.

BrockleyJohn commented 5 years ago

Anyone got a workaround? Client has a newly acquired 2.2.6 store and can't edit the manufacturer attribute on newly added products, while ones that were created before upgrade are populated.

Edit: it's here: https://github.com/magento/magento2/issues/18134#issuecomment-427341783

hostep commented 5 years ago

@BrockleyJohn points to the correct comment(s) indeed.

But this isn't a bug as far as I can see.

I just did some testing, with Magento 2.2.5, the apply_to column for the manufacturer attribute in the catalog_eav_attribute table in the database only has the value simple.

After upgrading to Magento 2.2.6, the apply_to value becomes simple,configurable.

If somehow this apply_to column got invalid values (where simple is missing somehow - not sure how this can happen though), you'd best manually fix that value directly in the database or using some upgrade script.

nickpiro commented 5 years ago

This is still an issue in 2.2.8. We just upgraded from 2.2.5 to 2.2.8 on our live site and now Manufacturer is missing!

hostep commented 5 years ago

@nickpiro: can you check your database and make sure the apply_to value for the manufacturer attribute in the catalog_eav_attribute table is set to simple,configurable (or all the product types you want it to be visible on)? If I have to guess it's probably set to something incorrect in your case. You can find the attribute_id of the manufacturer attribute in the eav_attribute table btw.

arrowgr commented 5 years ago

The database is the solution catalog_eav_attribute add this simple,configurable from configurable

adarshkhatri commented 4 years ago

Any reason it was made available only for simple and configurable products? We do have some bundle items that are from the same manufacturer and can be sold individually as well as bundled.

The main problem I have now is with my old data. When I migrated 1.9 to 2.3, I have bundle products with manufacturer data in it and they are showing fine, but now I cannot change them.

stephansteiner commented 3 years ago

Any reason it was made available only for simple and configurable products? We do have some bundle items that are from the same manufacturer and can be sold individually as well as bundled.

The main problem I have now is with my old data. When I migrated 1.9 to 2.3, I have bundle products with manufacturer data in it and they are showing fine, but now I cannot change them.

I ran into the same issue, having bundles consisting of products from the same manufacturer. The fix is to either add "bundle" to the list of values in "apply_to" or to set apply_to to NULL (so it can be assigned to any product type). First, find out the attribute id by searching in the database for: select attribute_id from eav_attribute where attribute_code='manufacturer';

Then, do an update to the table catalog_eav_attribute: update catalog_eav_attribute set apply_to=NULL where attribute_id=<put id from above>; After that, reindex and clear caches and the attribute will appear in the backend when editing a bundle product.

However, I'm wondering why there is no admin configuration possibility to change apply_to as there was in Magento1.