magento2: Parent menu not shown when there's only 1 submenu in admin panel
Preconditions
- Magento EE 2.2.1 & Magento EE 2.2.2
Steps to reproduce
-
Create a module
-
Create a new file menu.xml in folder adminhtml
-
Create new menu like this `
<add id="Footballexperience_Base::base" title="FExperience" module="Footballexperience_Base" sortOrder="20" resource="Magento_Customer::customer"/>
<add id="Footballexperience_Base::manage_stadiums" title="Manage Stadiums" module="Footballexperience_Base" sortOrder="10" parent="Footballexperience_Base::base" resource="Footballexperience_Base::manage_stadiums" /> <add id="Footballexperience_Base::stadiums" title="Stadiums" module="Footballexperience_Base" sortOrder="10" resource="Footballexperience_Base::stadiums" parent="Footballexperience_Base::manage_stadiums" action="febase/stadium/grid" />
`
Repository test
https://github.com/hi-rafa/magento2test221
Expected result
When you click the new menu added you should see inside a submenu like this Manage Stadiums -> Stadiums

Actual result
What you actually see is only the menu Stadiums unless you add more than one submenu.

Additional information
If you add 2 submenus it will work

About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 24 (16 by maintainers)
@hi-rafa This is actually a feature. This behavior and was added by this commit https://github.com/magento/magento2/commit/d91e96b529e70dcec55d3b5336b471791dc42d54, please check. so I’m closing this issue