Skip to content

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

Closed
@magento-engcom-team

Description

@magento-engcom-team

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.

Metadata

Metadata

Assignees

Labels

Mageconf_Contribution_DayPriority: P1Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing.Progress: doneProject: GraphQLSeverity: S3Affects non-critical data or functionality and does not force users to employ a workaround.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions