Skip to content

/V1/products/{sku}/media does not assign roles correctly #21736

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
giacmir opened this issue Mar 13, 2019 · 24 comments
Closed

/V1/products/{sku}/media does not assign roles correctly #21736

giacmir opened this issue Mar 13, 2019 · 24 comments
Labels
Component: Catalog Event: dmcdindia1 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: done Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Severity: S2 Major restrictions or short-term circumventions are required until a fix is available. Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it
Milestone

Comments

@giacmir
Copy link
Member

giacmir commented Mar 13, 2019

When uploading media gallery images via API the last inserted one gets all roles (small_image, base, thumbnail) even if not required to and another image already has them assigned.

Preconditions (*)

  1. Magento 2.3.0
  2. php 7.1

Steps to reproduce (*)

  1. create a new product without images
  2. POST to /V1/products/{sku}/media a payload that includes all the three image types "base", "small_image", "thumbnail"
    3.Verify in backend that the new image has all three roles
  3. POST another image to /V1/products/{sku}/media, this time the "types" node should be an empty array

Expected result (*)

  1. The last inserted image should have no roles
    2.The first image should have maintained its assigned roles

Actual result (*)

  1. last image has all three roles even if no one was specified.
@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Mar 13, 2019
@magento-engcom-team
Copy link
Contributor

magento-engcom-team commented Mar 13, 2019

Hi @giacmir. 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.

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

  • yes
  • no

@giacmir
Copy link
Member Author

giacmir commented Mar 13, 2019

@magento-engcom-team give me 2.3-develop instance

@magento-engcom-team
Copy link
Contributor

Hi @giacmir. Thank you for your request. I'm working on Magento 2.3-develop instance for you

@magento-engcom-team
Copy link
Contributor

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

@ghost ghost self-assigned this Mar 14, 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: Catalog Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release and removed Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release labels Mar 14, 2019
@ghost
Copy link

ghost commented Mar 14, 2019

Hi @giacmir thank you for you report, this issue has already fixed in 2.3-develop branch.
DeepinScreenshot_select-area_20190314110417

@ghost ghost closed this as completed Mar 14, 2019
@giacmir
Copy link
Member Author

giacmir commented Mar 14, 2019

Hi @engcom-backlog-nazar I actually tried that on the provided 2.3-develop instance yesterday and reproduced it. Was it fixed today?

@ghost
Copy link

ghost commented Mar 14, 2019

@giacmir can you share with your payloads ?

@ghost
Copy link

ghost commented Mar 14, 2019

@giacmir
DeepinScreenshot_select-area_20190314111928
DeepinScreenshot_select-area_20190314111940

@giacmir
Copy link
Member Author

giacmir commented Mar 14, 2019

@engcom-backlog-nazar sure thing:

payload 1

{
  "entry": {
    "media_type": "image",
    "label": "First",
    "position": "0",
    "disabled": 1,
    "types": [
      "thumbnail",
      "image",
      "small_image"
    ],
    "file": "first_file.jpg",
    "content": {
      "base64_encoded_data": "<base64 encoded image goes here>",
      "type": "image\/jpeg",
      "name": "first_file.jpg"
    },
    "extension_attributes": []
  }
}

payload 2

{
  "entry": {
    "media_type": "image",
    "label": "Second",
    "position": "1",
    "disabled": 0,
    "types": [],
    "file": "second_file.jpg",
    "content": {
      "base64_encoded_data": "<base64 data goes here>",
      "type": "image\/jpeg",
      "name": "second_file.jpg"
    },
    "extension_attributes": []
  }
}

Thank you

@ghost ghost reopened this Mar 14, 2019
@ghost
Copy link

ghost commented Mar 14, 2019

@giacmir this only appears if you set all 3 types, but with 2 types works correct. and only for for first 2 images.

@ghost ghost added 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 Mar 14, 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-98681 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 Mar 14, 2019
@Al3ks73
Copy link

Al3ks73 commented Mar 14, 2019

@magento-engcom-team give me 2.3-develop instance

@magento-engcom-team
Copy link
Contributor

Hi @Al3ks73. Thank you for your request. I'm working on Magento 2.3-develop instance for you

@magento-engcom-team
Copy link
Contributor

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

@shikhamis11 shikhamis11 self-assigned this Mar 28, 2019
@magento-engcom-team
Copy link
Contributor

Hi @shikhamis11. 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.

@shikhamis11 shikhamis11 removed their assignment Apr 10, 2019
@irajneeshgupta irajneeshgupta self-assigned this May 4, 2019
@m2-assistant
Copy link

m2-assistant bot commented May 4, 2019

Hi @irajneeshgupta. 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.

@irajneeshgupta
Copy link
Member

I am working on this at #dmcdindia1

@irajneeshgupta
Copy link
Member

@magento-engcom-team give me 2.3-develop instance

@magento-engcom-team
Copy link
Contributor

Hi @irajneeshgupta. Thank you for your request. I'm working on Magento 2.3-develop instance for you

@magento-engcom-team
Copy link
Contributor

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

@irajneeshgupta
Copy link
Member

This issue has already been resolved in 2.3.1

@irajneeshgupta irajneeshgupta removed their assignment May 11, 2019
@ghost ghost removed 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 Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development labels Oct 20, 2020
@sdzhepa sdzhepa added Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it and removed Progress: ready for dev labels Oct 29, 2020
@gabrieldagama gabrieldagama added Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Severity: S2 Major restrictions or short-term circumventions are required until a fix is available. labels Nov 12, 2020
@gabrieldagama gabrieldagama added this to the 2.5 milestone Nov 12, 2020
@engcom-Golf
Copy link
Contributor

Hi @giacmir, I could not reproduce this issue on 2.4-develop branch
It was probably fixed with changes in PR #18952
Will close this ticket.

@magento-engcom-team
Copy link
Contributor

Unfortunately, we are archiving this ticket now as it did not get much attention from both Magento Community and Core developers for an extended period. This is done in an effort to create a quality, community-driven backlog which will allow us to allocate the required attention more easily.

Please feel free to comment or reopen according to the Issue reporting guidelines
the ticket if you are still facing this issue on the latest 2.x-develop branch. Thank you for collaboration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Catalog Event: dmcdindia1 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: done Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Severity: S2 Major restrictions or short-term circumventions are required until a fix is available. Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it
Projects
None yet
Development

No branches or pull requests

9 participants