Skip to content

[Atwix]products query returns breadcrumb data for categories whose parent category is disabled #30468

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
magento-engcom-team opened this issue Oct 12, 2020 · 3 comments · Fixed by #30619
Assignees
Labels
Mageconf_Contribution_Day Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Progress: done Project: GraphQL Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround.
Milestone

Comments

@magento-engcom-team
Copy link
Contributor

In PWA Studio we select one of a product's categories to render breadcrumbs on the page.

!product_categories.png|thumbnail!

A product can belong to an enabled category whose parent is disabled.

!disabled_categories.png|thumbnail!

When querying for the product's categories.breadcrumbs data we are seeing the child category return with breadcrumbs data for the disabled category.

!product_query.jpg|thumbnail!

Because we don't know that the category ("id 8" from the screenshot) belongs to a disabled parent category ("id 7"), we use it as the category to render breadcrumbs for the product.

So we make a category query using the enabled child (8) for breadcrumbs data in order to render them:

!breadcrumb_query.png|thumbnail!

What results is our UI rendering links/breadcrumbs for categories which are inaccessible.

Expected Outcome:

I would expect that the GQL api expose that the category is disabled either by not including it in the result or by providing some prop such as disabled in the query.

You can repro by going https://venia-smoketest-x3mnlqi-c5v7sxvquxwl4.eu-4.magentosite.cloud/layla-tee.html for now.

@magento-engcom-team
Copy link
Contributor Author

The issue was exported from the internal JIRA. The link to the original JIRA issue: https://jira.corp.magento.com/browse/MC-38209

@magento-engcom-team magento-engcom-team added Progress: ready for dev Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. labels Oct 12, 2020
@m2-assistant
Copy link

m2-assistant bot commented Oct 12, 2020

Hi @magento-engcom-team. 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 give me 2.4-develop instance - upcoming 2.4.x release

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

Please, add a comment to assign the issue: @magento I am working on this


⚠️ 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, please 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

@magento-engcom-team magento-engcom-team changed the title products query returns breadcrumb data for categories whose parent category is disabled [Atwix]products query returns breadcrumb data for categories whose parent category is disabled Oct 12, 2020
@nrkapoor nrkapoor added this to the 2.4.2 milestone Oct 18, 2020
@eduard13
Copy link
Contributor

@magento I am working on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mageconf_Contribution_Day Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Progress: done Project: GraphQL Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants