I have been struggling with this error all day, I have tried all the solutions on Internet, but it keeps showing 404 Error when I click the link on my custom menu.

Here is my code


<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd">
        <add id="Vendor_Module::menu" title="Sift Science" module="Vendor_Module" sortOrder="51" resource="Vendor_Module::menu"/>
        <add id="Vendor_Module::menu_item" title="Configuration" module="Vendor_Module" sortOrder="10" parent="Vendor_Module::menu" action="SiftMenu/ConfigMenu/" resource="Vendor_Module::menu_item"/>

Controller /app/code/Vendor/Module/Controller/Adminhtml/ConfigMenu/SiftSetup.php


namespace Vendor\Module\Controller\adminhtml\configmenu;

use \Magento\Backend\App\Action;
use \Magento\Backend\App\Action\Context;
use Magento\Framework\View\Result\PageFactory;
use \Magento\Framework\Json\Helper\Data;

class SiftSetup extends Action
    protected $resultPageFactory;
    protected $jsonHelper;

    public function __construct(Context $context, PageFactory $pageFactory, Data $jsonHelper )
        $this->resultPageFactory = $pageFactory;
        $this->jsonHelper = $jsonHelper;

    public function execute()

        die ("test module");


routes.xml /app/code/Vendor/Module/etc/adminhtml/routes.xml

<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="standard">
        <route id="SiftMenu" frontName="SiftMenu">
            <module name="Vendor_Module" />


1 Answer 1


You first should change the namespace for controller's action

namespace Vendor\Module\Controller\Adminhtml\ConfigMenu; //Capital for first letter

You should change your action in the menu.xml:

<add id="Vendor_Module::menu_item" 
    title="Configuration" module="Vendor_Module" sortOrder="10" 
    action="siftMenu/configMenu/siftSetup"    #full controller-action pattern

You also need to change the routes.xml in etc/adminhtml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    <router id="admin"> <!-- admin -->
        <route id="SiftMenu" frontName="SiftMenu">
           <module name="Vendor_Module"/>
  • hello, it's still not working, I changed capital for first letter on route and controller folder. action="SiftMenu/ConfigMenu/SiftSetup" and namespace Transom\SiftScienceModule\Controller\Adminhtml\ConfigMenu; Commented Sep 19, 2019 at 22:48
  • <router id="admin"> instead of <router id="standard">
    – Jeff Yu
    Commented Sep 19, 2019 at 22:50
  • Oh it works now! thank you very much, I did not notice that Commented Sep 19, 2019 at 22:57

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.