Skip to content
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

REST API multiselect attribute BC break between 2.1.8 and 2.3.0 #21364

Open
mhujer opened this issue Feb 20, 2019 · 17 comments
Open

REST API multiselect attribute BC break between 2.1.8 and 2.3.0 #21364

mhujer opened this issue Feb 20, 2019 · 17 comments
Labels
Area: APIs Component: Api Use with concrete module component label E.g. "Component: Api" + "Catalog" Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: ready for dev Reported on 2.4.x Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Severity: S2 Major restrictions or short-term circumventions are required until a fix is available.

Comments

@mhujer
Copy link

mhujer commented Feb 20, 2019

Preconditions (*)

  1. Magento 2.4-develop

Steps to reproduce (*)

  1. Have a multiselect attribute
  2. Update the product data through the REST API and pass an array of IDs as a value for this multiselect attribute

Expected result (*)

  1. Attribute is updated (as it worked in 2.1.8)

Actual result (*)

  1. Error message is returned:
{
    "message": "Error occurred during \"custom_attributes\" processing. Attribute \"equipment\" has invalid value. The \"array\" value's type is invalid. The \"string\" type was expected. Verify and try again.",
    "trace": null
}

Workaround

Implode the ids and send them as a string. But it makes your code incompatible with Magento 2.1.8 as it expects an array of ids.

I guess that it is some kind of BC break, because Magento 2.1.8 works in a completely opposite way - it requires an array of IDs and rejects string with a message: {"message":"Error occurred during \"custom_attributes\" processing. Attribute \"equipment\" has invalid value. Invalid type for value: \"string\". Expected Type: \"string[]\"."}

Related issue: #6120

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Feb 20, 2019
@magento-engcom-team
Copy link
Contributor

magento-engcom-team commented Feb 20, 2019

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

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

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 2.3-develop instance - upcoming 2.3.x release

For more details, please, review the Magento Contributor Assistant documentation.

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

  • yes
  • no

@ankit-sf
Copy link

ankit-sf commented Feb 20, 2019

Now array of ids values is changed by comma seperated ids

@mhujer
Copy link
Author

mhujer commented Feb 20, 2019

@ankit-sf So this change was intentional and is expected?

@ankit-sf
Copy link

ankit-sf commented Feb 20, 2019

no, i don't think it is intentional, it's just that it is not corrected in 2.3 but is corrected in previous versions 2.2 and 2.1

@ghost ghost self-assigned this Feb 21, 2019
@magento-engcom-team
Copy link
Contributor

Hi @engcom-backlog-nazar. 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: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • Next steps are available in case you are a member of Community Maintainers.

  • 6. Add label Issue: Confirmed once verification is complete.

  • 7. Make sure that automatic system confirms that report has been added to the backlog.

@ghost ghost added Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Component: Eav Component: Catalog Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Feb 21, 2019
@magento-engcom-team
Copy link
Contributor

✅ Confirmed by @engcom-backlog-nazar
Thank you for verifying the issue. Based on the provided information internal tickets MAGETWO-98363, MAGETWO-98364 were created

Issue Available: @engcom-backlog-nazar, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@magento-engcom-team magento-engcom-team added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Feb 21, 2019
@Valant13 Valant13 self-assigned this Feb 28, 2019
@magento-engcom-team
Copy link
Contributor

Hi @Valant13. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:

  • 1. Add/Edit Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 2. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 3. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • 4. If the issue is not relevant or is not reproducible any more, feel free to close it.

@onepack
Copy link

onepack commented Oct 7, 2019

Any progress on this? The last update was in May. It's October now.

@zap263
Copy link

zap263 commented Dec 10, 2019

Any progress on this? The last update was in May. It's October now.

See post by @unicoder88

@onepack
Copy link

onepack commented Jun 18, 2020

Is this tested with just only admin values applied?
When I add translations it seems that the multiselect breaks again.

@engcom-Delta
Copy link
Contributor

Hi @mhujer ,

Thanks for your reporting and collaboration.
We have verified the issue in latest 2.4-develop instance and the issue is reproducible.
Kindly refer the screenshots.

Steps to reproduce

  1. Have a multiselect attribute
  2. Update the product data through the REST API and pass an array of IDs as a value for this multiselect attribute
    Error displays in response, instead of updating attribute value -
    image

Thanks.

@engcom-Delta engcom-Delta added Component: Api Use with concrete module component label E.g. "Component: Api" + "Catalog" Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Reported on 2.4.x Indicates original Magento version for the Issue report. Area: APIs Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed and removed Component: Catalog Component: Eav Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Area: APIs labels Sep 25, 2024
@github-jira-sync-bot
Copy link

❌ Cannot export the issue. This GitHub issue is already linked to Jira issue(s): https://jira.corp.adobe.com/browse/AC-773

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: APIs Component: Api Use with concrete module component label E.g. "Component: Api" + "Catalog" Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: ready for dev Reported on 2.4.x Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Severity: S2 Major restrictions or short-term circumventions are required until a fix is available.
Projects
None yet
Development

Successfully merging a pull request may close this issue.