1

While trying to access the admin panel i got following error. This was shown up from yesterday up to that time i don't have any issue

1 exception(s):
Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid Document 
Element 'route': Duplicate key-sequence ['admin'] in unique identity-constraint 'uniqueRouteFrontName'.
Line: 7


Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid Document 
Element 'route': Duplicate key-sequence ['admin'] in unique identity-constraint 'uniqueRouteFrontName'.
Line: 7

#0 /var/www/html/m2/vendor/magento/framework/Config/Reader/Filesystem.php(127): Magento\Framework\Config\Reader\Filesystem->_readFiles(Object(Magento\Framework\Config\FileIterator))
#1 /var/www/html/m2/var/generation/Magento/Framework/App/Route/Config/Reader/Proxy.php(95): Magento\Framework\Config\Reader\Filesystem->read('adminhtml')
#2 /var/www/html/m2/vendor/magento/framework/App/Route/Config.php(82): Magento\Framework\App\Route\Config\Reader\Proxy->read('adminhtml')
#3 /var/www/html/m2/vendor/magento/framework/App/Route/Config.php(125): Magento\Framework\App\Route\Config->_getRoutes('adminhtml')
#4 /var/www/html/m2/vendor/magento/framework/App/Router/Base.php(274): Magento\Framework\App\Route\Config->getModulesByFrontName('admin')
#5 /var/www/html/m2/vendor/magento/framework/App/Router/Base.php(161): Magento\Framework\App\Router\Base->matchAction(Object(Magento\Framework\App\Request\Http), Array)
#6 /var/www/html/m2/vendor/magento/framework/App/FrontController.php(50): Magento\Framework\App\Router\Base->match(Object(Magento\Framework\App\Request\Http))
#7 /var/www/html/m2/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#8 /var/www/html/m2/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#9 /var/www/html/m2/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'install')
#10 /var/www/html/m2/vendor/magento/framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#11 /var/www/html/m2/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#12 /var/www/html/m2/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#13 /var/www/html/m2/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#14 /var/www/html/m2/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#15 /var/www/html/m2/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#16 {main}
1

4 Answers 4

1

**You have custom module which have frontend name admin **

Check your all custom module

you will find route file have frontName admin. It probably in admin router file etc/adminhtml/routes.xml like this. So change the FrontName to any other name.

 <router id="admin">
    <route id="api" frontName="admin"> // admin 
        <module name="Shiprocket_api" />
    </route>
</router>

change to any other name

<router id="admin">
    <route id="api" frontName="api"> // admin change to api  
        <module name="Shiprocket_api" />
    </route>
</router>
0

It seems that you have a module that's trying to extend the customer route namespace. You should disable this module or change the frontName to something unique in etc/frontend/routes.xml for this module.

EDIT: I just figured out that changing your route_id to admin for the module should have Magento merge your routes in the same namespace: <route id="admin" frontName="admin">

0

Just ran into this issue today. The message Element 'route': Duplicate key-sequence ['...'] in unique identity-constraint 'uniqueRouteFrontName'. means that you have 2 modules trying to set the same route. Try finding the two modules that try to do this (usually in etc/frontend/routes.xml and/or etc/adminhtml/routes.xml).

-1

First of all try to clear cache from terminal using Or you can delete var/cache/* folder

1

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.