Magento2: Child categories included in menu when parent category is set not to "Include in Menu"

Created on 25 Aug 2017  路  15Comments  路  Source: magento/magento2

Description

When a subcategory is enabled and set to "Include in Menu" AND the parent category is disabled or set not to "Include in Menu" the subcategory is included as a top level menu item.

Preconditions

  1. Installed 2.2.0-RC21 via composer metapackage
  2. Installed sample data

Steps to reproduce

  1. Add new top level category and turn off "Include in Menu". (Note, issue is the same if the parent category is disabled)
  2. Add new sub category to the category added in step # 1. "Include in Menu" should be enabled by default.

Expected result

  1. Only top level categories that are enabled and set to "Include in Menu" will be rendered in the menu.
  2. Sub categories will only be included in the menu if both of the following are true:

    1. Category is enabled and set to include in menu

    2. Parent category is enabled and set to include in menu

Actual result

  1. The sub category added in step # 2 will be rendered as a top level category

Please note, it appears this issue was added via the following commit:
https://github.com/magento/magento2/commit/026a599577b45097f237d3acaf24bae347bd8e11#diff-b1fa678d0cae299f35fb1633bb9dcf5c

2017-08-25_1407

Catalog Fixed in 2.2.x Clear Description Format is valid needs update bug report

Most helpful comment

@okorshenko - I just upgraded to version 2.2.5, which seems to be latest version of 2.2 available. However, the bug as described is still there. In what exact version of 2.2 is this supposed to be fixed already?

All 15 comments

Thanks for reporting - internal issue is MAGETWO-72112

@toddwolaver thank you for the report. The issue already fixed in 2.2.0

@okorshenko - I just upgraded to version 2.2.5, which seems to be latest version of 2.2 available. However, the bug as described is still there. In what exact version of 2.2 is this supposed to be fixed already?

Having same issue on Magento 2.2.2 Enterprise Edition.

Still exists in Magento 2.3.2 CE.

@okorshenko This issue is still there in Magento 2.3.x. Anyone have solution for this ?

Encountered this issue on 2.3.3 just now.

Hi @engcom-Hotel. 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: :point_down:

  • [ ] 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.

Hello @BezV8
I am not able to reproduce this issue on the Magento 2.3.3 & 2.4-develop.

Testing scenario:

  1. Add new top level category and turn off "Include in Menu". (Note, issue is the same if the parent category is disabled)
    image
  2. Add new sub category to the category added in step # 1. "Include in Menu" should be enabled by default.
  3. Check top menu in the frontend.

Result:
There is no disabled category in top menu as expected:
image

So i have close this issue as not reproducible.

Could you verify my steps?

@magento give me 2.3-develop instance

@engcom-Hotel I have just tried the same methodology as you on a 2.3.3 site we are developing and the subcategory does show on the menu even when the parent is set to not show.

I have yet to test on a completely vanilla instance.

Screenshot_2020-01-20 Home page
Screenshot_2020-01-20 Test (ID 5) Categories Inventory Catalog Magento Admin

@BezV8 i tried again with enabled top category and a child category is not visible:
image
image

@BezV8 i think it is related to your custom theme(some category display layouts is broken). Please try to find different of your theme layouts and Luma theme. Hope it helps.
So now i have to finally close this issue as not reproducible.

Thanks for collaboration!

Hi @BezV8. Thank you for your request. I'm working on Magento 2.3.3-develop instance for you

@engcom-Hotel I managed to track the issue down to a custom extension, removing that fixed it.

Was this page helpful?
0 / 5 - 0 ratings