TypeError: Argument 2 passed to Magento\Catalog\Model\Layer\Category\CollectionFilter::filter() must be an instance of Magento\Catalog\Model\Category, instance of MGS\Blog\Model\Category given, called in /home/shakir/public_html/vendor/magento/module-catalog/Model/Layer.php on line 162 and defined in /home/shakir/public_html/vendor/magento/module-catalog/Model/Layer/Category/CollectionFilter.php:49 Stack trace: #0 /home/shakir/public_html/vendor/magento/module-catalog/Model/Layer.php(162): Magento\Catalog\Model\Layer\Category\CollectionFilter->filter(Object(Magento\Catalog\Model\ResourceModel\Product\Collection\Interceptor), Object(MGS\Blog\Model\Category)) #1 /home/shakir/public_html/vendor/magento/module-catalog/Block/Navigation.php(192): Magento\Catalog\Model\Layer->prepareProductCollection(Object(Magento\Catalog\Model\ResourceModel\Product\Collection\Interceptor)) #2 /home/shakir/public_html/app/design/frontend/Mgs/claue/Magento_Catalog/templates/navigation/top.phtml(23): Magento\Catalog\Block\Navigation->getCurrentChildCategories() #3 /home/shakir/public_html/vendor/magento/framework/View/TemplateEngine/Php.php(71): include('/home/shakir/pu...') #4 /home/shakir/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\Catalog\Block\Navigation), '/home/shakir/pu...', Array) #5 /home/shakir/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\View\TemplateEngine\Php\Interceptor->___callParent('render', Array) #6 /home/shakir/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\View\TemplateEngine\Php\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Catalog\Block\Navigation), '/home/shakir/pu...', Array) #7 /home/shakir/public_html/generated/code/Magento/Framework/View/TemplateEngine/Php/Interceptor.php(23): Magento\Framework\View\TemplateEngine\Php\Interceptor->___callPlugins('render', Array, Array) #8 /home/shakir/public_html/vendor/magento/framework/View/Element/Template.php(273): Magento\Framework\View\TemplateEngine\Php\Interceptor->render(Object(Magento\Catalog\Block\Navigation), '/home/shakir/pu...', Array) #9 /home/shakir/public_html/vendor/magento/framework/View/Element/Template.php(303): Magento\Framework\View\Element\Template->fetchView('/home/shakir/pu...') #10 /home/shakir/public_html/vendor/magento/framework/View/Element/AbstractBlock.php(1111): Magento\Framework\View\Element\Template->_toHtml() #11 /home/shakir/public_html/vendor/magento/framework/View/Element/AbstractBlock.php(1115): Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element\{closure}() #12 /home/shakir/public_html/vendor/magento/framework/View/Element/AbstractBlock.php(675): Magento\Framework\View\Element\AbstractBlock->_loadCache() #13 /home/shakir/public_html/vendor/magento/framework/View/Layout.php(578): Magento\Framework\View\Element\AbstractBlock->toHtml() #14 /home/shakir/public_html/vendor/magento/framework/View/Layout.php(555): Magento\Framework\View\Layout->_renderBlock('sub.categories') #15 /home/shakir/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(149): Magento\Framework\View\Layout->renderNonCachedElement('sub.categories') #16 /home/shakir/public_html/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('sub.categories') #17 /home/shakir/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(140): Magento\Framework\View\Layout->renderElement('sub.categories', true) #18 /home/shakir/public_html/vendor/magento/framework/View/Element/AbstractBlock.php(522): Magento\Framework\View\Layout\Interceptor->renderElement('sub.categories', true) #19 /home/shakir/public_html/app/design/frontend/Mgs/claue/Magento_Theme/templates/html/header.phtml(22): Magento\Framework\View\Element\AbstractBlock->getChildHtml('sub.categories') #20 /home/shakir/public_html/vendor/magento/framework/View/TemplateEngine/Php.php(71): include('/home/shakir/pu...') #21 /home/shakir/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\Theme\Block\Html\Header), '/home/shakir/pu...', Array) #22 /home/shakir/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\View\TemplateEngine\Php\Interceptor->___callParent('render', Array) #23 /home/shakir/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\View\TemplateEngine\Php\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Theme\Block\Html\Header), '/home/shakir/pu...', Array) #24 /home/shakir/public_html/generated/code/Magento/Framework/View/TemplateEngine/Php/Interceptor.php(23): Magento\Framework\View\TemplateEngine\Php\Interceptor->___callPlugins('render', Array, Array) #25 /home/shakir/public_html/vendor/magento/framework/View/Element/Template.php(273): Magento\Framework\View\TemplateEngine\Php\Interceptor->render(Object(Magento\Theme\Block\Html\Header), '/home/shakir/pu...', Array) #26 /home/shakir/public_html/vendor/magento/framework/View/Element/Template.php(303): Magento\Framework\View\Element\Template->fetchView('/home/shakir/pu...') #27 /home/shakir/public_html/vendor/magento/framework/View/Element/AbstractBlock.php(1111): Magento\Framework\View\Element\Template->_toHtml() #28 /home/shakir/public_html/vendor/magento/framework/View/Element/AbstractBlock.php(1115): Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element\{closure}() #29 /home/shakir/public_html/vendor/magento/framework/View/Element/AbstractBlock.php(675): Magento\Framework\View\Element\AbstractBlock->_loadCache() #30 /home/shakir/public_html/vendor/magento/framework/View/Layout.php(578): Magento\Framework\View\Element\AbstractBlock->toHtml() #31 /home/shakir/public_html/vendor/magento/framework/View/Layout.php(555): Magento\Framework\View\Layout->_renderBlock('header') #32 /home/shakir/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(149): Magento\Framework\View\Layout->renderNonCachedElement('header') #33 /home/shakir/public_html/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('header') #34 /home/shakir/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(140): Magento\Framework\View\Layout->renderElement('header', false) #35 /home/shakir/public_html/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout\Interceptor->renderElement('header', false) #36 /home/shakir/public_html/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer('header.containe...', false) #37 /home/shakir/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(149): Magento\Framework\View\Layout->renderNonCachedElement('header.containe...') #38 /home/shakir/public_html/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('header.containe...') #39 /home/shakir/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(140): Magento\Framework\View\Layout->renderElement('header.containe...', false) #40 /home/shakir/public_html/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout\Interceptor->renderElement('header.containe...', false) #41 /home/shakir/public_html/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer('page.wrapper', false) #42 /home/shakir/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(149): Magento\Framework\View\Layout->renderNonCachedElement('page.wrapper') #43 /home/shakir/public_html/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('page.wrapper') #44 /home/shakir/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(140): Magento\Framework\View\Layout->renderElement('page.wrapper', false) #45 /home/shakir/public_html/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout\Interceptor->renderElement('page.wrapper', false) #46 /home/shakir/public_html/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer('root', false) #47 /home/shakir/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(149): Magento\Framework\View\Layout->renderNonCachedElement('root') #48 /home/shakir/public_html/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('root') #49 /home/shakir/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(140): Magento\Framework\View\Layout->renderElement('root', true) #50 /home/shakir/public_html/vendor/magento/framework/View/Layout.php(975): Magento\Framework\View\Layout\Interceptor->renderElement('root') #51 /home/shakir/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\View\Layout->getOutput() #52 /home/shakir/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\View\Layout\Interceptor->___callParent('getOutput', Array) #53 /home/shakir/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\View\Layout\Interceptor->Magento\Framework\Interception\{closure}() #54 /home/shakir/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(347): Magento\Framework\View\Layout\Interceptor->___callPlugins('getOutput', Array, Array) #55 /home/shakir/public_html/vendor/magento/framework/View/Result/Page.php(258): Magento\Framework\View\Layout\Interceptor->getOutput() #56 /home/shakir/public_html/vendor/magento/framework/View/Result/Layout.php(171): Magento\Framework\View\Result\Page->render(Object(Magento\Framework\App\Response\Http\Interceptor)) #57 /home/shakir/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\View\Result\Layout->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor)) #58 /home/shakir/public_html/vendor/magento/framework/Interception/Interceptor.php(138): MGS\Mpanel\Block\Framework\Page\Interceptor->___callParent('renderResult', Array) #59 /home/shakir/public_html/app/code/Amasty/PageSpeedOptimizer/Plugin/ProcessPageResult.php(40): MGS\Mpanel\Block\Framework\Page\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Response\Http\Interceptor)) #60 /home/shakir/public_html/vendor/magento/framework/Interception/Interceptor.php(135): Amasty\PageSpeedOptimizer\Plugin\ProcessPageResult->aroundRenderResult(Object(MGS\Mpanel\Block\Framework\Page\Interceptor), Object(Closure), Object(Magento\Framework\App\Response\Http\Interceptor)) #61 /home/shakir/public_html/vendor/magento/framework/Interception/Interceptor.php(153): MGS\Mpanel\Block\Framework\Page\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Response\Http\Interceptor)) #62 /home/shakir/public_html/generated/code/MGS/Mpanel/Block/Framework/Page/Interceptor.php(113): MGS\Mpanel\Block\Framework\Page\Interceptor->___callPlugins('renderResult', Array, NULL) #63 /home/shakir/public_html/vendor/magento/framework/App/Http.php(120): MGS\Mpanel\Block\Framework\Page\Interceptor->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor)) #64 /home/shakir/public_html/generated/code/Magento/Framework/App/Http/Interceptor.php(23): Magento\Framework\App\Http->launch() #65 /home/shakir/public_html/vendor/magento/framework/App/Bootstrap.php(263): Magento\Framework\App\Http\Interceptor->launch() #66 /home/shakir/public_html/pub/index.php(31): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor)) #67 {main}