2

I am using a module which gives me this error when I try to open its settings in the admin.

This is part of the stack trace:

app/code/Rokanthemes/SlideBanner/Controller/Adminhtml/Slider/Index.php(70): Magento\Backend\Model\View\Result\Page->setActiveMenu('Rokanthemes_Sli...')

Code of controller: https://pastebin.com/wVrQ6QcE

I can see that it tries to set the menu for Rokanthemes_Slidebanner which is of course the extension I am talking about. The question is, why it cant set the menu for that single extension while the rest works just fine. I have no idea where to look anymore.

Thanks for helping!

7
  • can you post the full controller in here?
    – Marius
    Commented Apr 13, 2018 at 8:00
  • Sure, updated my post
    – Arnie
    Commented Apr 13, 2018 at 8:06
  • 1
    strange. The controller looks ok. For some reason $this->layout->getBlock('menu') returns false in this case.
    – Marius
    Commented Apr 13, 2018 at 8:27
  • Yes, but why, maybe its related to magento.stackexchange.com/questions/222174/…?
    – Arnie
    Commented Apr 13, 2018 at 8:32
  • are you sure that your extension files are readable?
    – Marius
    Commented Apr 13, 2018 at 8:42

2 Answers 2

8

Apparently, it is a bug. Deleting generated/metadata/global.php may solve it.

1
  • Thanks @dani-garval, it work for me. facing this problem from long time. Commented Mar 10, 2021 at 10:56
0

I encountered a similar issue in my project, which was caused by an incorrect layout configuration in the view. In my case, when creating the file app/code/MyModule/Core/view/adminhtml/layout/mymodulecore_license_index.xml, the generated code had an incorrect directive related to the layout.

printscreen remove directive layout

Simply removing that directive resolved the error for me.

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.