Skip to content

Unable to save multi-select attributes with grouped/configurable products #10540

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

Closed
apsummers opened this issue Aug 15, 2017 · 3 comments
Closed
Labels
Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed

Comments

@apsummers
Copy link

This issue appears to be similar to #4822, but is more like what @daniel-ifrim describes in the last comment. When updating product attributes on a Grouped Product, attributes using a multi-select field do not get saved correctly, and the values are ignored.

Simply saving the product does not trigger ArrayBackend::beforeSave at all. "Save and Duplicate" will trigger ArrayBackend::beforeSave, though the data returned by $object->getData($attributeCode); only contains the current selection. $object, which is passed to ArrayBackend::beforeSave does show the correct selections.

Multi-select fields do save correctly on Simple Products, and the other field types (dropdown, text) seem to save correctly on Grouped Products.

Preconditions

  1. Magento 2.1.7
  2. PHP 7.0.15
  3. MariaDB 10.1

Steps to reproduce

  1. Create a Grouped Product with a multi-select attribute
  2. Select one or more new values for that attribute
  3. Save

Expected result

  1. The attribute is updated

Actual result

  1. The original attribute value is still there
@apsummers
Copy link
Author

I've been looking into this more, and I've got some more info to hopefully help narrow this down:

  • The issue doesn't exist when the Grouped Product is composed of two Simple Products
  • The issue does exist when the Grouped Product contains multiple Configurable Products
  • The Configurable Products in the Grouped Product that does exhibit this behavior are using different attribute sets

@magento-engcom-team magento-engcom-team added G1 Passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed and removed G1 Passed labels Sep 5, 2017
@magento-engcom-team
Copy link
Contributor

magento-engcom-team commented Sep 14, 2017

@apsummers Thank you for report. We were not able to reproduce this issue by following the steps you provided. If you'd like to update it, please reopen the issue.

@A-1A
Copy link

A-1A commented Jun 19, 2018

I Found Solution after R&D On Magento database.
Login In your phpmyadmin
Go to your website database
Open "eav_attribute" table
Find Your multiselect "attribute_id"
Edit Row
If "backend_model" Column blank then paste this Magento\Eav\Model\Entity\Attribute\Backend\ArrayBackend
And Also Please check this
https://magento.stackexchange.com/questions/224621/warning-array-filter-expects-parameter-1-to-be-array/230444#230444

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed
Projects
None yet
Development

No branches or pull requests

4 participants