Sub-Categories do not display/navigate correctly in Storefront.
benmehlman opened this issue · comments
What I'm trying to achieve
Trying to organize some products into subcategories.
Steps to reproduce the problem
Using Saleor version 2.11
- Create categories with subcategories, then place products in the subcategories. I did this via GraphQL.
- In the storefront, click on a Category which contains a Subcategory.
What I expected to happen
When clicking on a top level category, I expected to see its sub-categories.
When clicking on a sub-category, I expected to see the products within it.
What did happen:
When I click on a category, the sub-categories are not displayed, instead I see products from within sub-categories displayed as if they were in the parent.
When I click on a product, the product page is displayed, but the breadcrumb is not right: It displays the sub-category name as if it was the parent category, eg. "Home > Subcategory" rather than the expected "Home > Category > Subcategory".
BUT if I click on the sub-category name in the above breadcrumb, it displays a page which correctly shows what I expected to see initially: A bread crumb in the form "Home > Category > SubCategory", with the items that are assigned to the subcategory displayed below.
Using GraphQL I've looked at the data for category and product, it looks correct. I've attached this information.
It seems there is a bug in the category display logic of the storefront when subcategories are used.
Screenshots
System information
Operating system: Server Debian 10, Browser Windows 10
Browser: Firefox 89.0.1 (Also tried Chrome 91, same results)
Thanks!
PS: In addition to this issue, it also seems that within the Dashboard, when trying to change the category of a product that is in a sub-category, when clicking.. only the current setting is displayed and it's not possible to select another category. This is not currently a problem for me because my catalog is being configured via graphql, but it does seem broken. I will submit this as another issue under saleor-dashboard if it is helpful. Thanks!
I have tried this with version 3.0 and the behavior is the same.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.