If you face this type of fatal error on customer wishlish page.
Fatal error: Uncaught Error: Call to a member function setUseContainer() on boolean in /var/www/vhosts/test.com/vendor/magento/module-wishlist/Block/Customer/Wishlist.php:127 Stack trace: #0 /var/www/vhosts/test.com/vendor/magento/framework/View/Element/AbstractBlock.php(286): MagentoWishlistBlockCustomerWishlist->_prepareLayout() #1 /var/www/vhosts/test.com/vendor/magento/framework/View/Layout/Generator/Block.php(149): MagentoFrameworkViewElementAbstractBlock->setLayout(Object(MagentoFrameworkViewLayoutInterceptor)) #2 /var/www/vhosts/test.com/vendor/magento/framework/View/Layout/GeneratorPool.php(81): MagentoFrameworkViewLayoutGeneratorBlock->process(Object(MagentoFrameworkViewLayoutReaderContext), Object(MagentoFrameworkViewLayoutGeneratorContext)) #3 /var/www/vhosts/test.com/vendor/magento/framework/View/Layout.php(352): MagentoFrameworkViewLayoutGeneratorPool->process(Object(Mag in /var/www/vhosts/test.com/vendor/magento/module-wishlist/Block/Customer/Wishlist.php on line 127
Then, follow below instruction to solve it.
Override wishlist_index_index.xml file in your theme and paste below code
. . . <block class="MagentoWishlistBlockCustomerWishlist" name="customer.wishlist" template="view.phtml" cacheable="false"> <block class="MagentoThemeBlockHtmlPager" name="wishlist_item_pager"/> . . .
in app/design/frontend/Magestore/theme/Magento_Wishlist/layout/wishlist_index_index.xml
After processing above steps, run below commands
- php bin/magento setup:upgrade - php bin/magento setup:di:compile - php bin/magento cache:clean
That’s it. Now, you can check your customer wishlist page. Your wishlist page error should be resolved.