-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Magento CE 2.4.4-p2 Frontend product search PHP 8.1 error #37332
Comments
Hi @kisfelix. Thank you for your report.
Join Magento Community Engineering Slack and ask your questions in #github channel. |
Hi @engcom-Bravo. Thank you for working on this issue.
|
Hi @engcom-Delta. Thank you for working on this issue.
|
Hi @kisfelix , Thank you for reporting and collaboration. Steps are followed to reproduce
Kindly please refer the below screenshot Search results in proper HTML layout ,Kindly recheck the behavior on Magento 2.4-develop instance and elaborate steps to reproduce if the issue is still reproducible. Thanks. |
Hi @kisfelix , We have noticed that this issue has not been updated for a period of 14 Days. Hence we assume that this issue is fixed now, so we are closing it. Please raise a fresh ticket or reopen this ticket if you need more assistance on this. Thanks |
Preconditions and environment
Magento CE 2.4.4-p2, PHP 8.1
Steps to reproduce
Search for product with search field (/catalogsearch/result/?cat=&q=ring)
Expected result
Search results in proper HTML layout
Actual result
Broken HTML code with following error displayed on page
TypeError: Magento\Catalog\Model\ResourceModel\Product\Collection::addCategoryFilter(): Argument #1 ($category) must be of type Magento\Catalog\Model\Category, null given, called in /home/[ACCOUNTNAME]/public_html/app/code/Blueskytechco/LayeredAjax/ViewModel/Layered.php on line 62 and defined in /home/[ACCOUNTNAME]/public_html/vendor/magento/module-catalog/Model/ResourceModel/Product/Collection.php:913
Stack trace:
#0 /home/[ACCOUNTNAME]/public_html/app/code/Blueskytechco/LayeredAjax/ViewModel/Layered.php(62): Magento\Catalog\Model\ResourceModel\Product\Collection->addCategoryFilter(NULL)
#1 /home/[ACCOUNTNAME]/public_html/app/code/Blueskytechco/LayeredAjax/view/frontend/templates/layer/filter.phtml(64): Blueskytechco\LayeredAjax\ViewModel\Layered->getPriceRange()
#2 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/View/TemplateEngine/Php.php(71): include('/home/[ACCOUNTNAME]...')
#3 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/View/Element/Template.php(263): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\LayeredNavigation\Block\Navigation\FilterRenderer\Interceptor), '/home/[ACCOUNTNAME]...', Array)
#4 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/View/Element/Template.php(293): Magento\Framework\View\Element\Template->fetchView('/home/[ACCOUNTNAME]...')
#5 /home/[ACCOUNTNAME]/public_html/vendor/magento/module-layered-navigation/Block/Navigation/FilterRenderer.php(29): Magento\Framework\View\Element\Template->_toHtml()
#6 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\LayeredNavigation\Block\Navigation\FilterRenderer->render(Object(Magento\CatalogSearch\Model\Layer\Filter\Price))
#7 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\LayeredNavigation\Block\Navigation\FilterRenderer\Interceptor->___callParent('render', Array)
#8 /home/[ACCOUNTNAME]/public_html/vendor/magento/module-swatches/Model/Plugin/FilterRenderer.php(63): Magento\LayeredNavigation\Block\Navigation\FilterRenderer\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\CatalogSearch\Model\Layer\Filter\Price))
#9 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Swatches\Model\Plugin\FilterRenderer->aroundRender(Object(Magento\LayeredNavigation\Block\Navigation\FilterRenderer\Interceptor), Object(Closure), Object(Magento\CatalogSearch\Model\Layer\Filter\Price))
#10 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\LayeredNavigation\Block\Navigation\FilterRenderer\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\CatalogSearch\Model\Layer\Filter\Price))
#11 /home/[ACCOUNTNAME]/public_html/generated/code/Magento/LayeredNavigation/Block/Navigation/FilterRenderer/Interceptor.php(23): Magento\LayeredNavigation\Block\Navigation\FilterRenderer\Interceptor->___callPlugins('render', Array, NULL)
#12 /home/[ACCOUNTNAME]/public_html/app/code/Blueskytechco/LayeredAjax/view/frontend/templates/layer/view.phtml(63): Magento\LayeredNavigation\Block\Navigation\FilterRenderer\Interceptor->render(Object(Magento\CatalogSearch\Model\Layer\Filter\Price))
#13 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/View/TemplateEngine/Php.php(71): include('/home/[ACCOUNTNAME]...')
#14 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/View/Element/Template.php(263): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\LayeredNavigation\Block\Navigation), '/home/[ACCOUNTNAME]...', Array)
#15 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/View/Element/Template.php(293): Magento\Framework\View\Element\Template->fetchView('/home/[ACCOUNTNAME]...')
#16 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/View/Element/AbstractBlock.php(1095): Magento\Framework\View\Element\Template->_toHtml()
#17 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/View/Element/AbstractBlock.php(1099): Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element{closure}()
#18 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/View/Element/AbstractBlock.php(660): Magento\Framework\View\Element\AbstractBlock->_loadCache()
#19 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/View/Layout.php(578): Magento\Framework\View\Element\AbstractBlock->toHtml()
#20 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/View/Layout.php(555): Magento\Framework\View\Layout->_renderBlock('catalogsearch.l...')
#21 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout->renderNonCachedElement('catalogsearch.l...')
#22 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout->renderElement('catalogsearch.l...', false)
#23 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer('sidebar.main', false)
#24 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout->renderNonCachedElement('sidebar.main')
#25 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout->renderElement('sidebar.main', false)
#26 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer('div.sidebar.mai...', false)
#27 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout->renderNonCachedElement('div.sidebar.mai...')
#28 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout->renderElement('div.sidebar.mai...', false)
#29 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer('columns', false)
#30 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout->renderNonCachedElement('columns')
#31 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout->renderElement('columns', false)
#32 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer('main.content', false)
#33 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout->renderNonCachedElement('main.content')
#34 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout->renderElement('main.content', false)
#35 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer('page.wrapper', false)
#36 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout->renderNonCachedElement('page.wrapper')
#37 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout->renderElement('page.wrapper', false)
#38 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer('root', false)
#39 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout->renderNonCachedElement('root')
#40 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/View/Layout.php(975): Magento\Framework\View\Layout->renderElement('root')
#41 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\View\Layout->getOutput()
#42 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\View\Layout\Interceptor->___callParent('getOutput', Array)
#43 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\View\Layout\Interceptor->Magento\Framework\Interception{closure}()
#44 /home/[ACCOUNTNAME]/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(41): Magento\Framework\View\Layout\Interceptor->___callPlugins('getOutput', Array, Array)
#45 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/View/Result/Page.php(260): Magento\Framework\View\Layout\Interceptor->getOutput()
#46 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/View/Result/Layout.php(171): Magento\Framework\View\Result\Page->render(Object(Magento\Framework\App\Response\Http\Interceptor))
#47 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\View\Result\Layout->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#48 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\View\Result\Page\Interceptor->___callParent('renderResult', Array)
#49 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Response\Http\Interceptor))
#50 /home/[ACCOUNTNAME]/public_html/generated/code/Magento/Framework/View/Result/Page/Interceptor.php(23): Magento\Framework\View\Result\Page\Interceptor->___callPlugins('renderResult', Array, Array)
#51 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/App/View.php(221): Magento\Framework\View\Result\Page\Interceptor->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#52 /home/[ACCOUNTNAME]/public_html/vendor/magento/module-catalog-search/Controller/Result/Index.php(168): Magento\Framework\App\View->renderLayout()
#53 /home/[ACCOUNTNAME]/public_html/vendor/magento/module-catalog-search/Controller/Result/Index.php(110): Magento\CatalogSearch\Controller\Result\Index->getNotCacheableResult(Object(Magento\CatalogSearch\Helper\Data), Object(Magento\Search\Model\Query), NULL)
#54 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\CatalogSearch\Controller\Result\Index->execute()
#55 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\CatalogSearch\Controller\Result\Index\Interceptor->___callParent('execute', Array)
#56 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\CatalogSearch\Controller\Result\Index\Interceptor->Magento\Framework\Interception{closure}()
#57 /home/[ACCOUNTNAME]/public_html/generated/code/Magento/CatalogSearch/Controller/Result/Index/Interceptor.php(23): Magento\CatalogSearch\Controller\Result\Index\Interceptor->___callPlugins('execute', Array, Array)
#58 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/App/Action/Action.php(111): Magento\CatalogSearch\Controller\Result\Index\Interceptor->execute()
#59 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#60 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\CatalogSearch\Controller\Result\Index\Interceptor->___callParent('dispatch', Array)
#61 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\CatalogSearch\Controller\Result\Index\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))
#62 /home/[ACCOUNTNAME]/public_html/generated/code/Magento/CatalogSearch/Controller/Result/Index/Interceptor.php(32): Magento\CatalogSearch\Controller\Result\Index\Interceptor->___callPlugins('dispatch', Array, Array)
#63 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/App/FrontController.php(245): Magento\CatalogSearch\Controller\Result\Index\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#64 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/App/FrontController.php(212): Magento\Framework\App\FrontController->getActionResponse(Object(Magento\CatalogSearch\Controller\Result\Index\Interceptor), Object(Magento\Framework\App\Request\Http))
#65 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/App/FrontController.php(147): Magento\Framework\App\FrontController->processRequest(Object(Magento\Framework\App\Request\Http), Object(Magento\CatalogSearch\Controller\Result\Index\Interceptor))
#66 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#67 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#68 /home/[ACCOUNTNAME]/public_html/vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(99): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))
#69 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#70 /home/[ACCOUNTNAME]/public_html/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(75): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))
#71 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/Interception/Interceptor.php(135): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#72 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))
#73 /home/[ACCOUNTNAME]/public_html/generated/code/Magento/Framework/App/FrontController/Interceptor.php(23): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, NULL)
#74 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/App/Http.php(116): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#75 /home/[ACCOUNTNAME]/public_html/vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http->launch()
#76 /home/[ACCOUNTNAME]/public_html/pub/index.php(30): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#77 {main}
Additional information
No response
Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: