magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.57k stars 9.32k forks source link

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

Closed magento-engcom-team closed 4 years ago

magento-engcom-team commented 4 years ago

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 commented 4 years ago

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

m2-assistant[bot] commented 4 years ago

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

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


:clock10: You can find the schedule on the Magento Community Calendar page.

:telephone_receiver: 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.

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

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

eduard13 commented 4 years ago

@magento I am working on this