Skip to content

Topmenu 'last' class not being set if the a parent is inactive #13266

Closed
@arnoudhgz

Description

@arnoudhgz

When one or more parents in the top menu are inactive the 'last' class is not being set on the last item.

Preconditions

  1. Magento 2.2

Steps to reproduce

  1. Do a clean install of Magento 2.2 with sample data
  2. Set a level 1 category (e.g. Gear or Gift Cards) inactive
  3. Inspect the menu and see there is no class 'last' on the last active topmenu item

Expected result

  1. The last menu item should have the class last

Actual result

  1. The last menu item does not have the class last

Tech hints

  • class Magento\Theme\Block\Html\Topmenu
  • method _getHtml
  • this part is not always being triggered correctly: $child->setIsLast($counter == $childrenCount);

Metadata

Metadata

Assignees

Labels

Fixed in 2.3.xThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions