Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admin menu with 1 submenu item does not show the subitem. #1292

Closed
tzyganu opened this issue May 20, 2015 · 3 comments
Closed

Admin menu with 1 submenu item does not show the subitem. #1292

tzyganu opened this issue May 20, 2015 · 3 comments
Labels
bug report Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Progress: needs update

Comments

@tzyganu
Copy link
Contributor

tzyganu commented May 20, 2015

Version
Magento2-0.74.0-beta9

Steps to reproduce
I'm creating my own extension for learning purposes and this should add a new menu item in the backend with a single submenu item.

This is the code from my module's adminhtml/menu.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../Magento/Backend/etc/menu.xsd">
    <menu>
        <add id="Sample_News::news" title="News" module="Sample_News" sortOrder="63" resource="Sample_News::news"/>
        <add id="Sample_News::author" title="Authors" module="Sample_News" sortOrder="10" action="sample_news/author" resource="Sample_News::author" parent="Sample_News::news"/>
    </menu>
</config>

Expected result
I should see my menu item in the backend and when clicking on it I should see a submenu with 1 item
expected

Actual result
I see my main menu, but when clicking it there is just an empty submenu
result

Note
The problem does not appear if I add a second submenu item to my main menu item.

Posible fix

I noticed that if I change the in method Magento\Backend\Block\Menu::renderNavigation this line

if (count($menu) > 1 || $level != 1) {

to this

if (count($menu) > 0 || $level != 1) {

my menu appears as expected.

@anupdugar anupdugar added the PS label May 22, 2015
@anupdugar
Copy link
Contributor

@tzyganu Thanks for reporting this bug. I have created an issue MAGETWO-37904 to track and get it fixed.

@anupdugar anupdugar added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development bug report labels May 22, 2015
magento-team pushed a commit that referenced this issue Jun 12, 2015
magento-team pushed a commit that referenced this issue Jun 12, 2015
magento-team pushed a commit that referenced this issue Jun 12, 2015
magento-team pushed a commit that referenced this issue Jun 12, 2015
@vpelipenko
Copy link
Contributor

@tzyganu, the fix is available from 0.74.0-beta13. Could you check it on the latest version?

@tzyganu
Copy link
Contributor Author

tzyganu commented Jun 16, 2015

@vpelipenko It seams to work fine now. Thanks for the quick fix.

@tzyganu tzyganu closed this as completed Jun 16, 2015
VitaliyBoyko pushed a commit to VitaliyBoyko/magento2 that referenced this issue Jun 22, 2018
Issue 1236: support of order operations for deleted from Catlog products
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Progress: needs update
Projects
None yet
Development

No branches or pull requests

3 participants