If you are declaring your router in etc/adminhtml/routes.xml with similar way

<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    <router id="admin">
        <route id="myModule" frontName="myModule">
            <module name="My_Module" before="Magento_Backend"/>

it doesn't work. In my case my base url will be /admin/myModule/index/index.

I was pushed to replace myModule with my_module (in URL in XML, at least in frontName attribute, and rename layout/handle filename).


It's enough to keep layout/handle file in lower case.

E.g. we have request:


Handle filename should be in lower case:


So, there is some debug experience:

Method \Magento\Framework\View\Result\Layout::getDefaultLayoutHandle() has converting to lowercase:

 * Retrieve the default layout handle name for the current action
 * @return string
public function getDefaultLayoutHandle()
    return strtolower($this->request->getFullActionName());

and there xpath request for the handle node:


foreach ($layout->xpath("*[self::handle or self::layout][@id='{$handle}']") as $updateXml) {

and it looks like it's case-sensitive.

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.