1

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>
6
  • is there any error in log files?
    – Piyush
    Commented Jul 6, 2017 at 5:41
  • No, there is no error in log files. Commented Jul 6, 2017 at 5:52
  • Can you provide code of menu.xml? Commented Jul 6, 2017 at 5:54
  • Hello @PrincePatel, please check my edited question. Commented Jul 6, 2017 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. Commented Jul 6, 2017 at 7:17

2 Answers 2

3

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.

3
  • 1
    But the menu is showing in localhost(xampp). And naming also correct as I give frontName in adminhtml/routes.xml. Commented Jul 6, 2017 at 7:25
  • 3
    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. Commented Jul 6, 2017 at 9:53
  • 1
    for me it was composer.json ^^ always double check file definitions xD
    – treyBake
    Commented Nov 13, 2017 at 9:57
2

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 and acknowledge you have read our privacy policy.

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