this is happening when I install megamenu from template monster and updated to Magento 2.2.6 any ideas? full error below
Fatal error: Uncaught TypeError: Argument 2 passed to Magento\Catalog\Plugin\Block\Topmenu::__construct() must be an instance of Magento\Catalog\Model\ResourceModel\Category\StateDependentCollectionFactory, instance of Magento\Catalog\Model\ResourceModel\Category\CollectionFactory given, called in /home/olabrava/public_html/app/code/TemplateMonster/Megamenu/Plugin/Block/Topmenu.php on line 27 and defined in /home/olabrava/public_html/vendor/magento/module-catalog/Plugin/Block/Topmenu.php:47 Stack trace: #0 /home/olabrava/public_html/app/code/TemplateMonster/Megamenu/Plugin/Block/Topmenu.php(27): Magento\Catalog\Plugin\Block\Topmenu->__construct(Object(Magento\Catalog\Helper\Category), Object(Magento\Catalog\Model\ResourceModel\Category\CollectionFactory), Object(Magento\Store\Model\StoreManager), Object(Magento\Catalog\Model\Layer\Resolver)) #1 /home/olabrava/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(111): TemplateMonster\Megamenu\Plugin\Block\Topmenu->__construct(Object(Magento\Catalo in /home/olabrava/public_html/vendor/magento/module-catalog/Plugin/Block/Topmenu.php on line 47
php bin/magento setup:upgrade
command ?rm -rf generated/*
first and then run setup commandphp bin/magento setup:upgrade