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

[GraphQl] Categories from root categories of other websites are returned. #34570

Closed
1 of 5 tasks
Hexmage opened this issue Nov 8, 2021 · 12 comments
Closed
1 of 5 tasks
Assignees
Labels
Area: Product Component: GraphQL GraphQL Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Progress: done Reported on 2.4.2-p1 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch

Comments

@Hexmage
Copy link

Hexmage commented Nov 8, 2021

Preconditions (*)

  1. Magento 2.4.2-p1
  2. Two Websites with different root categories

Steps to reproduce (*)

  1. Create a product
  2. Assign the product to both websites
  3. Add the product to a subcategory of both root categories.
  4. Request the product through GraphQl using the Store header of the first website.
query productDetail {
    productDetail: products(filter: {url_key: {eq: "24-MB01"}}) {
        items {
            sku
            __typename
            categories {
                name
                path
                url_key
            }
        }
    }
}

Expected result (*)

Only returns categories that are in the website's root category (in this example 2).

{
    "data": {
        "productDetail": {
            "items": [
                {
                    "sku": "24-MB01",
                    "__typename": "SimpleProduct",
                    "categories": [
                        {
                            "name": "Gear",
                            "path": "1/2/3",
                            "url_key": "gear"
                        },
                        {
                            "name": "Bags",
                            "path": "1/2/3/4",
                            "url_key": "bags"
                        }
                    ]
                }
            ]
        }
    }
}

Actual result (*)

Returns categories in every root category (in this case 2 and 41).

{
    "data": {
        "productDetail": {
            "items": [
                {
                    "sku": "24-MB01",
                    "__typename": "SimpleProduct",
                    "categories": [
                        {
                            "name": "Gear",
                            "path": "1/2/3",
                            "url_key": "gear"
                        },
                        {
                            "name": "Bags",
                            "path": "1/2/3/4",
                            "url_key": "bags"
                        },
                        {
                            "name": "Not Default Category",
                            "path": "1/41",
                            "url_key": "not-default-category"
                        }
                    ]
                }
            ]
        }
    }
}

Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
@m2-assistant
Copy link

m2-assistant bot commented Nov 8, 2021

Hi @Hexmage. Thank you for your report.
To speed up processing of this issue, make sure that you provided the following information:

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

Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, review the Magento Contributor Assistant documentation.

Add a comment to assign the issue: @magento I am working on this

To learn more about issue processing workflow, refer to the Code Contributions.


⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@m2-assistant
Copy link

m2-assistant bot commented Nov 8, 2021

Hi @engcom-November. 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.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.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. Add label Issue: Confirmed once verification is complete.

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

@engcom-November
Copy link

Verified the issue on Magento 2.4-develop branch but the issue is not reproducible:
Only categories that are in the website's root category are returned - No issue:
image

image
@Hexmage kindly verify the issue on Magento 2.4-develop branch and provide missing steps if any if the issue is still reproducible.
Thank you.

@engcom-November engcom-November added Reported on 2.4.2-p1 Indicates original Magento version for the Issue report. Issue: needs update Additional information is require, waiting for response labels Nov 8, 2021
@m2-community-project m2-community-project bot moved this from Ready for Confirmation to Needs Update in Issue Confirmation and Triage Board Nov 8, 2021
@engcom-November engcom-November added the Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch label Nov 8, 2021
@Hexmage
Copy link
Author

Hexmage commented Nov 8, 2021

@engcom-November
Your test is exactly what is wrong.
It shouldn't show both default and france. It should only show either default or france based on which website your storeview is in.

@engcom-November
Copy link

Thank you for the confirmation @Hexmage. Verified the issue again on Magento 2.4-develop branch and the issue is reproducible.
All categories are returned on running the GraphQL query regardless to the store view assigned.

@engcom-November engcom-November added Area: Product Component: GraphQL GraphQL Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch and removed Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch Issue: needs update Additional information is require, waiting for response labels Nov 25, 2021
@m2-community-project m2-community-project bot moved this from Needs Update to Ready for Confirmation in Issue Confirmation and Triage Board Nov 25, 2021
@engcom-November engcom-November added Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed and removed Issue: ready for confirmation labels Nov 25, 2021
@m2-community-project m2-community-project bot moved this from Ready for Confirmation to Confirmed in Issue Confirmation and Triage Board Nov 25, 2021
@m2-community-project m2-community-project bot moved this from Ready for Confirmation to Confirmed in Issue Confirmation and Triage Board Nov 25, 2021
@github-jira-sync-bot
Copy link

✅ Jira issue https://jira.corp.magento.com/browse/AC-1883 is successfully created for this GitHub issue.

@m2-assistant
Copy link

m2-assistant bot commented Nov 25, 2021

✅ Confirmed by @engcom-November. Thank you for verifying the issue.
Issue Available: @engcom-November, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@engcom-Alfa engcom-Alfa added the Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. label Nov 30, 2021
@m2-community-project m2-community-project bot added this to Ready for Development in High Priority Backlog Nov 30, 2021
@m2-community-project m2-community-project bot moved this from Ready for Development to Dev In Progress in High Priority Backlog Dec 10, 2021
@Usik2203
Copy link
Contributor

@magento I am working on this

@Usik2203
Copy link
Contributor

@magento give me 2.4-develop instance

@magento-deployment-service
Copy link

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

@magento-deployment-service
Copy link

Hi @Usik2203, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

@m2-community-project m2-community-project bot moved this from Pull Request In Progress to Dev In Progress in High Priority Backlog Dec 29, 2021
@m2-community-project m2-community-project bot moved this from Pull Request In Progress to Dev In Progress in High Priority Backlog Dec 29, 2021
@m2-community-project m2-community-project bot moved this from Dev In Progress to Ready for Development in High Priority Backlog Dec 29, 2021
@m2-community-project m2-community-project bot moved this from Dev In Progress to Ready for Development in High Priority Backlog Dec 29, 2021
@m2-community-project m2-community-project bot moved this from Ready for Development to Pull Request In Progress in High Priority Backlog Jan 7, 2022
@m2-community-project m2-community-project bot moved this from Ready for Development to Pull Request In Progress in High Priority Backlog Jan 7, 2022
@engcom-Hotel
Copy link
Contributor

Hello @Hexmage,

As I can see this issue got fixed in the scope of the internal Jira ticket AC-1883 by the internal team
Related commits: https://github.com/magento/magento2/search?q=AC-1883&type=commits

Based on Jira, the target version is 2.4.5.

Thanks

@m2-community-project m2-community-project bot moved this from Pull Request In Progress to Done in High Priority Backlog May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Product Component: GraphQL GraphQL Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Progress: done Reported on 2.4.2-p1 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch
Projects
Development

Successfully merging a pull request may close this issue.

6 participants