cancel
Showing results for 
Search instead for 
Did you mean: 

Two 'add' commands cannot have equal id (Magento_Backend::mgs)

Two 'add' commands cannot have equal id (Magento_Backend::mgs)

When I installed MGS "Mmegamenu" module in my magento v2.o.5. Frontend is loading fine but when I login to admin panel it is showing the below error :

There has been an error processing your request
Two 'add' commands cannot have equal id (Magento_Backend::mgs)

Error log record number: 1359101751531

Can you please help me in this. Thank you soo much in advance.

1 REPLY 1

Re: Two 'add' commands cannot have equal id (Magento_Backend::mgs)

Hey @khalid_ahmed1 


As per the error message, It looks like you have same id in menu.xml, you can see this error message on this file,

vendor\magento\module-backend\Model\Menu\Builder\Command\Add.php

public function chain(\Magento\Backend\Model\Menu\Builder\AbstractCommand $command)
{
    if ($command instanceof \Magento\Backend\Model\Menu\Builder\Command\Add) {
        throw new \InvalidArgumentException("Two 'add' commands cannot have equal id (" . $command->getId() . ")");
    }
    return parent::chain($command);
}

Please confirm your menu id is different or you have something wrong in menu.xml in your custom module. Check once menu.xml in your module or try once after commenting block in menu.xml to identify the id which is making problem. Then rename it. 

I hope it will help you.