EmicoEcommerce / Magento2Tweakwise-archived

Magento 2 module for Tweakwise integration
Other
9 stars 25 forks source link

Call to a member function render() on boolean when upgrade to latest version #18

Closed VesnaS closed 6 years ago

VesnaS commented 6 years ago

Tweakwise extension version: latest release Magento version: 2.1.6 PHP 7

After upgrade to the latest extension version, when we view catalog product list on the frontend, we get the following error:

PHP Fatal error:  Uncaught Error: Call to a member function render() on boolean in app/code/Emico/Tweakwise/view/frontend/templates/product/navigation/view.phtml:52
Stack trace:
#0 vendor/magento/framework/View/TemplateEngine/Php.php(59): include()
#1 vendor/magento/framework/View/Element/Template.php(255): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\LayeredNavigation\Block\Navigation), '/var/domains/co...', Array)
#2 vendor/magento/framework/View/Element/Template.php(279): Magento\Framework\View\Element\Template->fetchView('/var/domains/co...')
#3 vendor/magento/framework/View/Element/AbstractBlock.php(659): Magento\Framework\View\Element\Template->_toHtml()
#4 vendor/magento/framework/View/Layout.php(542): Magento\Framework\View\Element\AbstractBlock- in app/code/Emico/Tweakwise/view/frontend/templates/product/navigation/view.phtml on line 52

This happens only when 'Use default magento filter renderer' is set to 'No'.

tweakwise_admin_config

Fgruntjes commented 6 years ago

Hello

I edited your issue to use proper code blocks. Please use them in the feature to make sure you dont make invalid references to other issues.

Also please be more descriptive with your title.

Fgruntjes commented 6 years ago

We checked with a fresh install of 2.1.6 and the test data but this error did not occur. Also the block 'renderer' that is being used also exists in this version from Magento and also used in the default template. Also see the original template where view/frontend/templates/product/navigation/view.phtml was based on. https://github.com/magento/magento2/blob/b8b698beca72ddba29c7ad4e781cee78260ce523/app/code/Magento/LayeredNavigation/view/frontend/templates/layer/view.phtml#L40

Please provide us with steps to reproduce using a fresh install of Magento without any custom modules so we can check and fix the issue.

VesnaS commented 6 years ago

I'm sorry about the code formatting.

We tested further, and it turned out that the installed theme uses layered navigation in the wrong way. This bug didn't show up until Tweakwise extension was upgraded, as it overrides this functionality.

Thank you for your time

Fgruntjes commented 6 years ago

No worries, happy I could help.