Skip to content
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

Error: Call to a member function shouldDisplayProductCountOnLayer() on null in /vendor/magento/module-layered-navigation/view/frontend/templates/layer/filter.phtml:21 #31024

Closed
pratikkamani opened this issue Nov 24, 2020 · 15 comments

Comments

@pratikkamani
Copy link

Preconditions (*)

  1. Magento 2.4.1 (Upgraded from Magento 2.3.3)
  2. Visit category page

Steps to reproduce (*)

  1. Upgrade the site from Magento 2.3.3 to Magento 2.4.1
  2. Open the category listing page

Expected result (*)

  1. Need to display the category product.

Actual result (*)

issue


Error: Call to a member function shouldDisplayProductCountOnLayer() on null in /vendor/magento/module-layered-navigation/view/frontend/templates/layer/filter.phtml:21

@m2-assistant
Copy link

m2-assistant bot commented Nov 24, 2020

Hi @pratikkamani. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

Please, add a comment to assign the issue: @magento I am working on this


⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@m2-assistant
Copy link

m2-assistant bot commented Dec 14, 2020

Hi @engcom-Delta. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Add label Issue: Confirmed once verification is complete.

  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-Delta
Copy link
Contributor

Hi @pratikkamani , thank you for your report. I'm not able to reproduce issue on clean magento without custom modules. I tried upgrade from 2.3.6 to 2.4.1 according docs and there was no issue after upgrade

Could you provide additional magento configuration you have before upgrade?

@engcom-Delta engcom-Delta added the Issue: needs update Additional information is require, waiting for response label Dec 14, 2020
@mohanwbsofttech
Copy link

I also have the same problem
Shop By
Shopping Options
Colour
Black Error: Call to a member function shouldDisplayProductCountOnLayer() on null in /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/module-layered-navigation/view/frontend/templates/layer/filter.phtml:21 Stack trace: #0 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/View/TemplateEngine/Php.php(71): include() #1 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/View/Element/Template.php(273): Magento\Framework\View\TemplateEngine\Php->render() #2 /var/www/vhosts/theacrylicstore.co.uk/htdocs/generated/code/Magento/LayeredNavigation/Block/Navigation/FilterRenderer/Interceptor.php(86): Magento\Framework\View\Element\Template->fetchView() #3 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/View/Element/Template.php(303): Magento\LayeredNavigation\Block\Navigation\FilterRenderer\Interceptor->fetchView() #4 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/module-layered-navigation/Block/Navigation/FilterRenderer.php(29): Magento\Framework\View\Element\Template->_toHtml() #5 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/Interception/Interceptor.php(58): Magento\LayeredNavigation\Block\Navigation\FilterRenderer->render() #6 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/Interception/Interceptor.php(138): Magento\LayeredNavigation\Block\Navigation\FilterRenderer\Interceptor->___callParent() #7 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/module-swatches/Model/Plugin/FilterRenderer.php(63): Magento\LayeredNavigation\Block\Navigation\FilterRenderer\Interceptor->Magento\Framework\Interception{closure}() #8 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Swatches\Model\Plugin\FilterRenderer->aroundRender() #9 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/Interception/Interceptor.php(153): Magento\LayeredNavigation\Block\Navigation\FilterRenderer\Interceptor->Magento\Framework\Interception{closure}() #10 /var/www/vhosts/theacrylicstore.co.uk/htdocs/generated/code/Magento/LayeredNavigation/Block/Navigation/FilterRenderer/Interceptor.php(23): Magento\LayeredNavigation\Block\Navigation\FilterRenderer\Interceptor->___callPlugins() #11 /var/www/vhosts/theacrylicstore.co.uk/htdocs/app/design/frontend/wbs-theme/wbs/Magento_LayeredNavigation/templates/layer/view.phtml(41): Magento\LayeredNavigation\Block\Navigation\FilterRenderer\Interceptor->render() #12 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/View/TemplateEngine/Php.php(71): include('/var/www/vhosts...') #13 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/View/Element/Template.php(273): Magento\Framework\View\TemplateEngine\Php->render() #14 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/View/Element/Template.php(303): Magento\Framework\View\Element\Template->fetchView() #15 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/View/Element/AbstractBlock.php(1111): Magento\Framework\View\Element\Template->_toHtml() #16 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/View/Element/AbstractBlock.php(1115): Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element{closure}() #17 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/View/Element/AbstractBlock.php(675): Magento\Framework\View\Element\AbstractBlock->_loadCache() #18 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/View/Layout.php(566): Magento\Framework\View\Element\AbstractBlock->toHtml() #19 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/View/Layout.php(542): Magento\Framework\View\Layout->_renderBlock() #20 /var/www/vhosts/theacrylicstore.co.uk/htdocs/generated/code/Magento/Framework/View/Layout/Interceptor.php(149): Magento\Framework\View\Layout->renderNonCachedElement() #21 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/View/Layout.php(497): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() #22 /var/www/vhosts/theacrylicstore.co.uk/htdocs/generated/code/Magento/Framework/View/Layout/Interceptor.php(140): Magento\Framework\View\Layout->renderElement() #23 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/View/Layout.php(594): Magento\Framework\View\Layout\Interceptor->renderElement() #24 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/View/Layout.php(544): Magento\Framework\View\Layout->_renderContainer() #25 /var/www/vhosts/theacrylicstore.co.uk/htdocs/generated/code/Magento/Framework/View/Layout/Interceptor.php(149): Magento\Framework\View\Layout->renderNonCachedElement() #26 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/View/Layout.php(497): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() #27 /var/www/vhosts/theacrylicstore.co.uk/htdocs/generated/code/Magento/Framework/View/Layout/Interceptor.php(140): Magento\Framework\View\Layout->renderElement() #28 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/View/Layout.php(594): Magento\Framework\View\Layout\Interceptor->renderElement() #29 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/View/Layout.php(544): Magento\Framework\View\Layout->_renderContainer() #30 /var/www/vhosts/theacrylicstore.co.uk/htdocs/generated/code/Magento/Framework/View/Layout/Interceptor.php(149): Magento\Framework\View\Layout->renderNonCachedElement() #31 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/View/Layout.php(497): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() #32 /var/www/vhosts/theacrylicstore.co.uk/htdocs/generated/code/Magento/Framework/View/Layout/Interceptor.php(140): Magento\Framework\View\Layout->renderElement() #33 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/View/Layout.php(594): Magento\Framework\View\Layout\Interceptor->renderElement() #34 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/View/Layout.php(544): Magento\Framework\View\Layout->_renderContainer() #35 /var/www/vhosts/theacrylicstore.co.uk/htdocs/generated/code/Magento/Framework/View/Layout/Interceptor.php(149): Magento\Framework\View\Layout->renderNonCachedElement() #36 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/View/Layout.php(497): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() #37 /var/www/vhosts/theacrylicstore.co.uk/htdocs/generated/code/Magento/Framework/View/Layout/Interceptor.php(140): Magento\Framework\View\Layout->renderElement() #38 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/View/Layout.php(594): Magento\Framework\View\Layout\Interceptor->renderElement() #39 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/View/Layout.php(544): Magento\Framework\View\Layout->_renderContainer() #40 /var/www/vhosts/theacrylicstore.co.uk/htdocs/generated/code/Magento/Framework/View/Layout/Interceptor.php(149): Magento\Framework\View\Layout->renderNonCachedElement() #41 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/View/Layout.php(497): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() #42 /var/www/vhosts/theacrylicstore.co.uk/htdocs/generated/code/Magento/Framework/View/Layout/Interceptor.php(140): Magento\Framework\View\Layout->renderElement() #43 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/View/Layout.php(594): Magento\Framework\View\Layout\Interceptor->renderElement() #44 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/View/Layout.php(544): Magento\Framework\View\Layout->_renderContainer() #45 /var/www/vhosts/theacrylicstore.co.uk/htdocs/generated/code/Magento/Framework/View/Layout/Interceptor.php(149): Magento\Framework\View\Layout->renderNonCachedElement() #46 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/View/Layout.php(497): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() #47 /var/www/vhosts/theacrylicstore.co.uk/htdocs/generated/code/Magento/Framework/View/Layout/Interceptor.php(140): Magento\Framework\View\Layout->renderElement() #48 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/View/Layout.php(594): Magento\Framework\View\Layout\Interceptor->renderElement() #49 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/View/Layout.php(544): Magento\Framework\View\Layout->_renderContainer() #50 /var/www/vhosts/theacrylicstore.co.uk/htdocs/generated/code/Magento/Framework/View/Layout/Interceptor.php(149): Magento\Framework\View\Layout->renderNonCachedElement() #51 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/View/Layout.php(497): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() #52 /var/www/vhosts/theacrylicstore.co.uk/htdocs/generated/code/Magento/Framework/View/Layout/Interceptor.php(140): Magento\Framework\View\Layout->renderElement() #53 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/View/Layout.php(963): Magento\Framework\View\Layout\Interceptor->renderElement() #54 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\View\Layout->getOutput() #55 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\View\Layout\Interceptor->___callParent() #56 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\View\Layout\Interceptor->Magento\Framework\Interception{closure}() #57 /var/www/vhosts/theacrylicstore.co.uk/htdocs/generated/code/Magento/Framework/View/Layout/Interceptor.php(347): Magento\Framework\View\Layout\Interceptor->___callPlugins() #58 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/View/Result/Page.php(258): Magento\Framework\View\Layout\Interceptor->getOutput() #59 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/View/Result/Layout.php(171): Magento\Framework\View\Result\Page->render() #60 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\View\Result\Layout->renderResult() #61 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\View\Result\Page\Interceptor->___callParent() #62 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception{closure}() #63 /var/www/vhosts/theacrylicstore.co.uk/htdocs/generated/code/Magento/Framework/View/Result/Page/Interceptor.php(95): Magento\Framework\View\Result\Page\Interceptor->___callPlugins() #64 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/App/Http.php(120): Magento\Framework\View\Result\Page\Interceptor->renderResult() #65 /var/www/vhosts/theacrylicstore.co.uk/htdocs/generated/code/Magento/Framework/App/Http/Interceptor.php(23): Magento\Framework\App\Http->launch() #66 /var/www/vhosts/theacrylicstore.co.uk/htdocs/vendor/magento/framework/App/Bootstrap.php(263): Magento\Framework\App\Http\Interceptor->launch() #67 /var/www/vhosts/theacrylicstore.co.uk/htdocs/pub/index.php(40): Magento\Framework\App\Bootstrap->run() #68 {main}

@grassst
Copy link

grassst commented Jan 3, 2021

Hi,

I also have the same problem when in update my shop from 2.3.5-p2 to 2.4.1 and I try to do a search.
The catetory pages work fine.

[2021-01-03` 16:11:43] main.CRITICAL: Error: Call to a member function shouldDisplayProductCountOnLayer() on null in /var/www/html/vendor/magento/module-layered-navigation/view/frontend/templates/layer/filter.phtml:21
Stack trace:
#0 /var/www/html/vendor/magento/framework/View/TemplateEngine/Php.php(71): include()
#1 /var/www/html/vendor/magento/framework/View/Element/Template.php(273): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\LayeredNavigation\Block\Navigation\FilterRenderer\Interceptor), '/var/www/html/v...', Array)
#2 /var/www/html/vendor/magento/framework/View/Element/Template.php(303): Magento\Framework\View\Element\Template->fetchView('/var/www/html/v...')
#3 /var/www/html/vendor/magento/module-layered-navigation/Block/Navigation/FilterRenderer.php(29): Magento\Framework\View\Element\Template->_toHtml()
#4 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\LayeredNavigation\Block\Navigation\FilterRenderer->render(Object(Magento\CatalogSearch\Model\Layer\Filter\Category))
#5 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\LayeredNavigation\Block\Navigation\FilterRenderer\Interceptor->___callParent('render', Array)
#6 /var/www/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\Category))
#7 /var/www/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\Category))
#8 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\LayeredNavigation\Block\Navigation\FilterRenderer\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\CatalogSearch\Model\Layer\Filter\Category))
#9 /var/www/html/generated/code/Magento/LayeredNavigation/Block/Navigation/FilterRenderer/Interceptor.php(23): Magento\LayeredNavigation\Block\Navigation\FilterRenderer\Interceptor->___callPlugins('render', Array, NULL)
#10 /var/www/html/vendor/magento/theme-frontend-luma/Magento_LayeredNavigation/templates/layer/view.phtml(63): Magento\LayeredNavigation\Block\Navigation\FilterRenderer\Interceptor->render(Object(Magento\CatalogSearch\Model\Layer\Filter\Category))
#11 /var/www/html/vendor/magento/framework/View/TemplateEngine/Php.php(71): include('/var/www/html/v...')
#12 /var/www/html/vendor/magento/framework/View/Element/Template.php(273): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\LayeredNavigation\Block\Navigation), '/var/www/html/v...', Array)
#13 /var/www/html/vendor/magento/framework/View/Element/Template.php(303): Magento\Framework\View\Element\Template->fetchView('/var/www/html/v...')
#14 /var/www/html/vendor/magento/framework/View/Element/AbstractBlock.php(1111): Magento\Framework\View\Element\Template->_toHtml()
#15 /var/www/html/vendor/magento/framework/View/Element/AbstractBlock.php(1115): Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element{closure}()
#16 /var/www/html/vendor/magento/framework/View/Element/AbstractBlock.php(675): Magento\Framework\View\Element\AbstractBlock->_loadCache()
#17 /var/www/html/vendor/magento/framework/View/Layout.php(566): Magento\Framework\View\Element\AbstractBlock->toHtml()
#18 /var/www/html/vendor/magento/framework/View/Layout.php(542): Magento\Framework\View\Layout->_renderBlock('catalogsearch.l...')
#19 /var/www/html/vendor/magento/framework/View/Layout.php(497): Magento\Framework\View\Layout->renderNonCachedElement('catalogsearch.l...')
#20 /var/www/html/vendor/magento/framework/View/Layout.php(594): Magento\Framework\View\Layout->renderElement('catalogsearch.l...', false)
#21 /var/www/html/vendor/magento/framework/View/Layout.php(544): Magento\Framework\View\Layout->_renderContainer('sidebar.main', false)
#22 /var/www/html/vendor/magento/framework/View/Layout.php(497): Magento\Framework\View\Layout->renderNonCachedElement('sidebar.main')
#23 /var/www/html/vendor/magento/framework/View/Layout.php(594): Magento\Framework\View\Layout->renderElement('sidebar.main', false)
#24 /var/www/html/vendor/magento/framework/View/Layout.php(544): Magento\Framework\View\Layout->_renderContainer('div.sidebar.mai...', false)
#25 /var/www/html/vendor/magento/framework/View/Layout.php(497): Magento\Framework\View\Layout->renderNonCachedElement('div.sidebar.mai...')
#26 /var/www/html/vendor/magento/framework/View/Layout.php(594): Magento\Framework\View\Layout->renderElement('div.sidebar.mai...', false)
#27 /var/www/html/vendor/magento/framework/View/Layout.php(544): Magento\Framework\View\Layout->_renderContainer('columns', false)
#28 /var/www/html/vendor/magento/framework/View/Layout.php(497): Magento\Framework\View\Layout->renderNonCachedElement('columns')
#29 /var/www/html/vendor/magento/framework/View/Layout.php(594): Magento\Framework\View\Layout->renderElement('columns', false)
#30 /var/www/html/vendor/magento/framework/View/Layout.php(544): Magento\Framework\View\Layout->_renderContainer('main.content', false)
#31 /var/www/html/vendor/magento/framework/View/Layout.php(497): Magento\Framework\View\Layout->renderNonCachedElement('main.content')
#32 /var/www/html/vendor/magento/framework/View/Layout.php(594): Magento\Framework\View\Layout->renderElement('main.content', false)
#33 /var/www/html/vendor/magento/framework/View/Layout.php(544): Magento\Framework\View\Layout->_renderContainer('page.wrapper', false)
#34 /var/www/html/vendor/magento/framework/View/Layout.php(497): Magento\Framework\View\Layout->renderNonCachedElement('page.wrapper')
#35 /var/www/html/vendor/magento/framework/View/Layout.php(594): Magento\Framework\View\Layout->renderElement('page.wrapper', false)
#36 /var/www/html/vendor/magento/framework/View/Layout.php(544): Magento\Framework\View\Layout->_renderContainer('root', false)
#37 /var/www/html/vendor/magento/framework/View/Layout.php(497): Magento\Framework\View\Layout->renderNonCachedElement('root')
#38 /var/www/html/vendor/magento/framework/View/Layout.php(963): Magento\Framework\View\Layout->renderElement('root')
#39 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\View\Layout->getOutput()
#40 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\View\Layout\Interceptor->___callParent('getOutput', Array)
#41 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\View\Layout\Interceptor->Magento\Framework\Interception{closure}()
#42 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(41): Magento\Framework\View\Layout\Interceptor->___callPlugins('getOutput', Array, Array)
#43 /var/www/html/vendor/magento/framework/View/Result/Page.php(258): Magento\Framework\View\Layout\Interceptor->getOutput()
#44 /var/www/html/vendor/magento/framework/View/Result/Layout.php(171): Magento\Framework\View\Result\Page->render(Object(Magento\Framework\App\Response\Http\Interceptor))
#45 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\View\Result\Layout->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#46 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\View\Result\Page\Interceptor->___callParent('renderResult', Array)
#47 /var/www/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))
#48 /var/www/html/generated/code/Magento/Framework/View/Result/Page/Interceptor.php(23): Magento\Framework\View\Result\Page\Interceptor->___callPlugins('renderResult', Array, Array)
#49 /var/www/html/vendor/magento/framework/App/View.php(221): Magento\Framework\View\Result\Page\Interceptor->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#50 /var/www/html/vendor/magento/module-catalog-search/Controller/Result/Index.php(138): Magento\Framework\App\View->renderLayout()
#51 /var/www/html/vendor/magento/module-catalog-search/Controller/Result/Index.php(108): Magento\CatalogSearch\Controller\Result\Index->getCacheableResult(Object(Magento\CatalogSearch\Helper\Data), Object(Magento\Search\Model\Query), NULL)
#52 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\CatalogSearch\Controller\Result\Index->execute()
#53 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\CatalogSearch\Controller\Result\Index\Interceptor->___callParent('execute', Array)
#54 /var/www/html/vendor/magento/framework/App/Action/Plugin/ActionFlagNoDispatchPlugin.php(51): Magento\CatalogSearch\Controller\Result\Index\Interceptor->Magento\Framework\Interception{closure}()
#55 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Framework\App\Action\Plugin\ActionFlagNoDispatchPlugin->aroundExecute(Object(Magento\CatalogSearch\Controller\Result\Index\Interceptor), Object(Closure))
#56 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\CatalogSearch\Controller\Result\Index\Interceptor->Magento\Framework\Interception{closure}()
#57 /var/www/html/generated/code/Magento/CatalogSearch/Controller/Result/Index/Interceptor.php(23): Magento\CatalogSearch\Controller\Result\Index\Interceptor->___callPlugins('execute', Array, Array)
#58 /var/www/html/vendor/magento/framework/App/Action/Action.php(111): Magento\CatalogSearch\Controller\Result\Index\Interceptor->execute()
#59 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#60 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\CatalogSearch\Controller\Result\Index\Interceptor->___callParent('dispatch', Array)
#61 /var/www/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 /var/www/html/generated/code/Magento/CatalogSearch/Controller/Result/Index/Interceptor.php(32): Magento\CatalogSearch\Controller\Result\Index\Interceptor->___callPlugins('dispatch', Array, Array)
#63 /var/www/html/vendor/magento/framework/App/FrontController.php(186): Magento\CatalogSearch\Controller\Result\Index\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#64 /var/www/html/vendor/magento/framework/App/FrontController.php(118): Magento\Framework\App\FrontController->processRequest(Object(Magento\Framework\App\Request\Http), Object(Magento\CatalogSearch\Controller\Result\Index\Interceptor))
#65 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#66 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#67 /var/www/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))
#68 /var/www/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))
#69 /var/www/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))
#70 /var/www/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))
#71 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))
#72 /var/www/html/generated/code/Magento/Framework/App/FrontController/Interceptor.php(23): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, NULL)
#73 /var/www/html/vendor/magento/framework/App/Http.php(116): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#74 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\Http->launch()
#75 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\Http\Interceptor->___callParent('launch', Array)
#76 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\Http\Interceptor->Magento\Framework\Interception{closure}()
#77 /var/www/html/generated/code/Magento/Framework/App/Http/Interceptor.php(23): Magento\Framework\App\Http\Interceptor->___callPlugins('launch', Array, Array)
#78 /var/www/html/vendor/magento/framework/App/Bootstrap.php(263): Magento\Framework\App\Http\Interceptor->launch()
#79 /var/www/html/pub/index.php(40): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#80 {main} [] []

@engcom-Delta engcom-Delta removed the Issue: needs update Additional information is require, waiting for response label Jan 18, 2021
@engcom-Delta
Copy link
Contributor

@mohanwbsofttech @grassst Are you upgraded according docs? Do you have information about magento configuration that was missed in original issue description?
According current description issue is not reproducible

@engcom-Delta engcom-Delta added the Issue: needs update Additional information is require, waiting for response label Jan 18, 2021
@grassst
Copy link

grassst commented Jan 18, 2021

@VasylShvorak yes i am doing the update like the docs in your link.
would be great to get help.
thx.

@hareshpatel
Copy link

how can resolve same issue can you plz send code

@iux
Copy link

iux commented Feb 4, 2021

Hello, i have the same problem. At the moment to fix it i did:
copy: vendor/magento/module-layered-navigation/view/frontend/templates/layer/filter.phtml to app/design/frontend/Vendor/ThemeName/Magento_LayeredNavigation/templates/layer/filter.phtml
and removed from line 21 to 29.

@grassst
Copy link

grassst commented Feb 6, 2021

Hello,

@iux thank you!
That worked also for me... :-)

@engcom-Delta engcom-Delta removed the Issue: needs update Additional information is require, waiting for response label Feb 26, 2021
@engcom-Delta
Copy link
Contributor

@grassst Looks like issue was caused by your custom theme/extension.
Is this issue solved for you and could be closed?

@engcom-Delta engcom-Delta added the Issue: needs update Additional information is require, waiting for response label Feb 26, 2021
@grassst
Copy link

grassst commented Feb 26, 2021

Hi,
yes the issue is now solved and it looks like it was a issue in my theme.
So for me it is ok to close this issue.

Thank you.

@engcom-Delta engcom-Delta removed their assignment Mar 1, 2021
@engcom-Bravo engcom-Bravo removed the Issue: needs update Additional information is require, waiting for response label Mar 5, 2021
@julianmurillo85
Copy link

I came across this error as well, when updating Magento to 2.4.2.

It's because of the declaration of the template filter.phtml in your custom theme, which does not take into account the new view model that the core templates comes with.

Somewhere in your (xml files) custom theme, you should adjust it like this:

                <block class="Magento\LayeredNavigation\Block\Navigation\FilterRenderer" name="catalog.navigation.renderer" as="renderer" template="Magento_LayeredNavigation::layer/filter.phtml">
                    <arguments>
                        <argument name="product_layer_view_model" xsi:type="object">Magento\LayeredNavigation\ViewModel\Layer\Filter</argument>
                    </arguments>
                </block>

That did the trick for me, and i hope it does for everyone :)

@engcom-November engcom-November self-assigned this Jun 14, 2021
@m2-assistant
Copy link

m2-assistant bot commented Jun 14, 2021

Hi @engcom-November. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Add label Issue: Confirmed once verification is complete.

  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-November
Copy link
Contributor

Hi,
Closing this issue as the solution - Changing custom theme is working fine (Magento 2.4.2) and Category Products are displayed in Category Listing page as expected.
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants