Fatal error: Uncaught Error: Call to a member function toHtml() on boolean - magento2

I am using Magento 2 and porto theme. My issue is with layered navigation.
When I search anything in my store results shows along with custom attribute filters, created through Store > Attribute > Product.
When results shows and I click on attribute to filter further ajax loads and nothing happens.
These are the errors I can see in console.
Fatal error: Uncaught Error: Call to a member function toHtml() on boolean in /app/code/Mageplaza/LayeredNavigation/Controller/Search/Result/Index.php:132
Stack trace:
#0 /public_html/generated/code/Mageplaza/LayeredNavigation/Controller/Search/Result/Index/Interceptor.php(24): Mageplaza\LayeredNavigation\Controller\Search\Result\Index->execute()
#1 /public_html/vendor/magento/framework/App/Action/Action.php(107): Mageplaza\LayeredNavigation\Controller\Search\Result\Index\Interceptor->execute()
#2 /public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#3 /public_html/vendor/magento/framework/Interception/Interceptor.php(138): Mageplaza\LayeredNavigation\Controller\Search\Result\Index\Interceptor->___callParent('dispatch', Array)
#4 /public_html/vendor/magento/framework/Interception/Interceptor.php(153): Mageplaza\LayeredNa in /public_html/app/code/Mageplaza/LayeredNavigation/Controller/Search/Result/Index.php on line 132
Please help.
Thank you in advance.

Related

IONIC-4 Navigation - how get parameter passed

Iam new to Ionic - 4.
I have function which is navigated to my items page.
gradeItem = function(data){
this.navCtrl.navigate('grade/items', {data:data});
}
and it is successfully navigating.
Now I want to access my parameter data from my items.page.ts file.
can anyone please help me on this.I tried navParams but it throwing error like
ERROR Error: Uncaught (in promise): Error: StaticInjectorError(AppModule)[ItemsPage -> NavParams]:

Exception - Call to undefined function course_overviewfiles_options()

I am using a Moodle(3.2.2 the newest one) site created by php7.0 and mysql5.7,but when i try to add a new course as administrator, an error called :Exception - Call to undefined function course_overviewfiles_options(). What can i do to fix it?
I did 'Purge all caches' from Development,so the problem above disappeared,but
when users login, another error occurred: Exception - Call to undefined function core_login_get_return_url().
I did 'Purge all caches'again, the problem no.2 disappeared and the no.1 occurred again.
did you include the correct library resource file?
require_once($CFG->libdir. '/coursecatlib.php'); (I think)
HTH

Call to a member function get_cart_subtotal() on a non-object in config-woocommerce/config.php on line 790

I'm trying to login into my WordPress Admin panel, and am getting the following error:
Call to a member function get_cart_subtotal() on a non-object in /home/spicom/public_html/adwinang.com/wp-content/themes/enfold/config-woocommerce/config.php on line 790
This is my code at line 790:
$cart_subtotal = $woocommerce->cart->get_cart_subtotal();
It sounds like you haven't called global $woocommerce;, before trying to access the $woocommerce object.
A better way would be to use WC():
$cart_subtotal = WC()->cart->get_cart_subtotal();
Alternatively, it's possible the WooCommerce hasn't even been installed and activated...make sure to do that, if it's a theme dependency.
I had a very similar message.
[25-Sep-2018 10:24:08 UTC] PHP Fatal error: Uncaught Error:
Call to a member function get_cart_subtotal() on null in
themes\storefront\inc\woocommerce\storefront-woocommerce-template-functions.php:80
It was due to me having the following in my wp-config.php file.
define( 'DOING_CRON', false );
I'd added this line while attempting to run something from the command line with W3 Total Cache activated. I didn't realise that it would completely ruin WooCommerce and didn't notice the side effect until attempting to view the site in my browser.

Why does second load of this dart:js date picker code error?

I use the following code in dart (chrome app):
js.context.callMethod(r'$', ['.datepicker']).callMethod('datepicker', [new js.JsObject.jsify({'format':'yyyy-mm-dd'})]);
which works fine the first time this code is rendered. However, if I navigate away and back to the page, I get the following error:
Uncaught Uncaught Error: NullError: Cannot call "split" on null
Stack Trace:
TypeError: Cannot read property 'split' of undefined
at Object.DPGlobal.parseDate (chrome-extension://lgndonjnifhllkkomohiinkfdaphgalc/js/bootstrap-datepicker.js:393:20)
at Datepicker.update (chrome-extension://lgndonjnifhllkkomohiinkfdaphgalc/js/bootstrap-datepicker.js:161:25)
at new Datepicker (chrome-extension://lgndonjnifhllkkomohiinkfdaphgalc/js/bootstrap-datepicker.js:84:8)
at HTMLDivElement.<anonymous> (chrome-extension://lgndonjnifhllkkomohiinkfdaphgalc/js/bootstrap-datepicker.js:341:38)
at Function.n.extend.each (chrome-extension://lgndonjnifhllkkomohiinkfdaphgalc/js/jquery-2.1.3.min.js:2:2882)
at n.fn.n.each (chrome-extension://lgndonjnifhllkkomohiinkfdaphgalc/js/jquery-2.1.3.min.js:2:847)
at $.fn.datepicker (chrome-extension://lgndonjnifhllkkomohiinkfdaphgalc/js/bootstrap-datepicker.js:336:15)
at JsObject.callMethod$2 (chrome-extension://lgndonjnifhllkkomohiinkfdaphgalc/b2015.dart.js:19892:42)
at navAccTranS24_closure.call$1 (chrome-extension://lgndonjnifhllkkomohiinkfdaphgalc/b2015.dart.js:23116:58)
at _RootZone.runUnary$2 (chrome-extension://lgndonjnifhllkkomohiinkfdaphgalc/b2015.dart.js:10124:18)
By navigate I mean I use children.clear() on the holding div the re-populate it with new html.
I presume I should only run this code once, or 'unload' it when I navigate away but I am just guessing here and would appreciate a solution.

Uncaught exception 'Zend_Application_Bootstrap_Exception' with message 'Resource matching "autoloader" not found

I am new to Zend framework. I am updating a project which was developed by another person. I am getting an error like,
Generating config... PHP Fatal error: Uncaught exception
'Zend_Application_Bootstrap_Exception' with message 'Resource matching "autoloader" not found'
in /project/aggrep/library/Zend/Application/Bootstrap/BootstrapAbstract.php:692
Stack trace:
#0 /project/aggrep/library/Zend/Application/Bootstrap/BootstrapAbstract.php(627):
Zend_Application_Bootstrap_BootstrapAbstract->_executeResource('autoloader')
#1 /project/aggrep/library/Zend/Application/Bootstrap/BootstrapAbstract.php(584):
Zend_Application_Bootstrap_BootstrapAbstract->_bootstrap('autoloader')
#2 /project/aggrep/library/Zend/Application.php(355):
Zend_Application_Bootstrap_BootstrapAbstract->bootstrap('autoloader')
#3 /project/aggrep/process/init.php(27): Zend_Application->bootstrap('autoloader')
#4 /project/scripts/generate_distro.php(3): require('/project/aggrep...')
#5 {main}
thrown in /project/aggrep/library/Zend/Application/Bootstrap/BootstrapAbstract.php on line 692
Done
What I need to do or what I need to check? Anyone please help me?
Thanks,
Looking forward!
This kind of error comes from an improper bootstrapping.
In your Bootstrap.php there are a bunch of functions starting with _init, eg. public function _initAutoload(). All of these are automatically executed upon application launch, but if a particular order is needed, one can use $this->bootstrap('autoload'); in one of these functions, to make sure, that the resource _initAutoload() has been executed.
It is more than likely, that a function in Bootstrap.php is requesting a resource _initAutoload() which doesn't exist/has been renamed.