0

I have created a custom module in magento2 in my localhost and it is working fine.

But when I import it on live server and install. It is showing in module list as enabled and custom table also cretaed on live server by module, but menu is not showing in admin panel.

I have cleared cache and reindex indexes, also di:compile setup but still menu is not showing on live server.

What is going wrong on live server? Is there any error in my module or anything else?

Thanks in advance.

EDIT :

My menu.xml :

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd">
    <menu>
        <add id="Vendor_Custom::manager" title="Vendor" module="Vendor_Custom" sortOrder="999" resource="Vendor_Custom::manager"/>
        <add id="Vendor_Custom::add_row" title="Row" module="Vendor_Custom" sortOrder="10" parent="Vendor_Custom::manager" action="custom/custom" resource="Magento_Backend::content"/>
    </menu>
</config>
  • is there any error in log files? – Piyush Jul 6 '17 at 5:41
  • No, there is no error in log files. – Vinaya Maheshwari Jul 6 '17 at 5:52
  • Can you provide code of menu.xml? – Prince Patel Jul 6 '17 at 5:54
  • Hello @PrincePatel, please check my edited question. – Vinaya Maheshwari Jul 6 '17 at 6:16
  • I think the error is with the acl.xml file. check the user permissions that you have loggedIn then check whether your module is listing in the resources list or not. – Pavan Kumar Jul 6 '17 at 7:17
2

Please check the Naming of that module If there will be any start small letter which should start in capital letter then module menue would not be show.

Still if it will not show then copy the core module menu xml and paste in your module menu.xml and change according to your module.

  • 1
    But the menu is showing in localhost(xampp). And naming also correct as I give frontName in adminhtml/routes.xml. – Vinaya Maheshwari Jul 6 '17 at 7:25
  • 1
    After changing folder name from vendor/custom/etc/Adminhtml/menu.xml to vendor/custom/etc/adminhtml/menu.xml menu is displaying in admin panel. Thanks. – Vinaya Maheshwari Jul 6 '17 at 9:53
  • for me it was composer.json ^^ always double check file definitions xD – treyBake Nov 13 '17 at 9:57
0

if menu.xml is in Vendor/Module/etc/Adminhtml folder, Please rename Adminhtml to adminhtml.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.