Latest news

[Fix It Series] Magento 2 Error: Custom Links in Admin Menu CE 2.1.8

No comments


The developer creates a new module. Although the module is successfully installed and enabled, when clicking on the link on the admin menu it goes to the Dashboard.

Here is the structure of the files in app/code/dfprojects:

fix magento 2 errors custom links













In System –> User Roles the entries for the menu are activated:

how to fix magento 2 error with custom link



In the admin menu:

magento 2 fix error






The link from “Eigenanlieferung” is DOMAIN/ADMIN_PSEUDO/dfpea/eigenan/index/key/….

When clicking on “Eigenanlieferung”, the Dashboard will appear.

Here is the app/code/dfprojects/module-dfpea/etc/adminhtml/routes.xml:

magento 2.1.8 error







and the app/code/dfprojects/module-dfpea/Controller/Adminhtml/Eigenan/Index.php

magento 2 custom link error


There are 2 causes that lead to the problem:

– The code of the route file is not correct

– It lacks the menu.xml file in the etc/adminhtml













There are 3 simple steps to handle this Magento 2 error:

    • Step 1: Editing the app/code/dfprojects/module-dfpea/etc/adminhtml/routes.xml file as the following:

<?xml version="1.0"?>
<config xmlns:xsi="" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="admin">
        <route id="dfpea" frontName="dfpea">
            <module name="DfProjects_DfpEa" before="Magento_Backend" />
    • Step 2: Creating the file app/code/dfprojects/module-dfpea/etc/adminhtml/menu.xml as the following:

<?xml version="1.0"?>
 <!--@copyright Copyright (c) 2016>
<config xmlns:xsi="" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd">
        <add id="DfProjects_DfpEa:: eigenan" title="Eigenanlieferung" module=" DfProjects_DfpEa " sortOrder="20" resource="DfProjects_DfpEa:: eigenan" />
  • Step 3: Running the following command:

    Php bin/magento cache:flush

    Then reloading the page.

We have shown you 3 steps to fix the error related to custom link in the admin menu of Magento CE 2.1.8. If you have any problems when following the instructions, please leave a comment below. See you in the next Magento 2 tutorials.

See More:

[Fix It Series] Magento Error: Missing all sale tables but sale orders are recorded

[Fix It Series] Magento 2 Error: getLastRealOrderId Doesn’t Work After Checkout With Enabled Page Cache

[Fix It Series] Magento Error: Invalid Form Key. Please refresh the page

[Fix It Series] Total Price In Wishlist Page Is $0.00 In Magento 2

[Fix It Series] Magento Error: Custom Option Type Fields Are Not Displayed

[Fix It Series] Magento Error: Front Controller Reached 100 router Match Iterations

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
April Lee[Fix It Series] Magento 2 Error: Custom Links in Admin Menu CE 2.1.8

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *