-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Description
Steps to reproduce
- Install Magento 2.0.4.
- Used this code
$this->_eventManager->dispatch('customer_data_object_login', ['customer' => $customer]);
Expected result
- Can use this event for custom login
Actual result
a:4:{i:0;s:78:"Invalid method Magento\Customer\Model\Address::isDefaultBilling(Array ( ) )";i:1;s:11690:"#0 /home/magento2/www/vendor/magento/module-tax/Observer/CustomerLoggedInObserver.php(90): Magento\Framework\DataObject->__call('isDefaultBillin...', Array) #1 /home/magento2/www/vendor/magento/module-tax/Observer/CustomerLoggedInObserver.php(90): Magento\Customer\Model\Address->isDefaultBilling() #2 /home/magento2/www/vendor/magento/framework/Event/Invoker/InvokerDefault.php(73): Magento\Tax\Observer\CustomerLoggedInObserver->execute(Object(Magento\Framework\Event\Observer)) #3 /home/magento2/www/vendor/magento/framework/Event/Invoker/InvokerDefault.php(61): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod(Object(Magento\Tax\Observer\CustomerLoggedInObserver), Object(Magento\Framework\Event\Observer)) #4 /home/magento2/www/vendor/magento/framework/Event/Manager.php(66): Magento\Framework\Event\Invoker\InvokerDefault->dispatch(Array, Object(Magento\Framework\Event\Observer)) #5 /home/magento2/www/var/generation/Magento/Framework/Event/Manager/Proxy.php(95): Magento\Framework\Event\Manager->dispatch('customer_data_o...', Array) #6 /home/magento2/www/app/code/Mateco/LoginAsCustomer/Model/Login.php(172): Magento\Framework\Event\Manager\Proxy->dispatch('customer_data_o...', Array) #7 /home/magento2/www/app/code/Mateco/LoginAsCustomer/Controller/Login/Index.php(24): Mateco\LoginAsCustomer\Model\Login->authenticateCustomer() #8 /home/magento2/www/var/generation/Mateco/LoginAsCustomer/Controller/Login/Index/Interceptor.php(24): Mateco\LoginAsCustomer\Controller\Login\Index->execute() #9 /home/magento2/www/vendor/magento/framework/App/Action/Action.php(102): Mateco\LoginAsCustomer\Controller\Login\Index\Interceptor->execute() #10 [internal function]: Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http)) #11 /home/magento2/www/vendor/magento/framework/Interception/Interceptor.php(74): call_user_func_array(Array, Array) #12 /home/magento2/www/vendor/magento/framework/Interception/Chain/Chain.php(70): Mateco\LoginAsCustomer\Controller\Login\Index\Interceptor->___callParent('dispatch', Array) #13 /home/magento2/www/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Mateco\LoginAsC...', 'dispatch', Object(Mateco\LoginAsCustomer\Controller\Login\Index\Interceptor), Array, 'designLoader') #14 /home/magento2/www/vendor/magento/framework/App/Action/Plugin/Design.php(39): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http)) #15 [internal function]: Magento\Framework\App\Action\Plugin\Design->aroundDispatch(Object(Mateco\LoginAsCustomer\Controller\Login\Index\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http)) #16 /home/magento2/www/vendor/magento/framework/Interception/Chain/Chain.php(68): call_user_func_array(Array, Array) #17 /home/magento2/www/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Mateco\LoginAsC...', 'dispatch', Object(Mateco\LoginAsCustomer\Controller\Login\Index\Interceptor), Array, 'customer-app-ac...') #18 /home/magento2/www/vendor/magento/module-customer/Model/App/Action/ContextPlugin.php(61): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http)) #19 [internal function]: Magento\Customer\Model\App\Action\ContextPlugin->aroundDispatch(Object(Mateco\LoginAsCustomer\Controller\Login\Index\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http)) #20 /home/magento2/www/vendor/magento/framework/Interception/Chain/Chain.php(68): call_user_func_array(Array, Array) #21 /home/magento2/www/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Mateco\LoginAsC...', 'dispatch', Object(Mateco\LoginAsCustomer\Controller\Login\Index\Interceptor), Array, 'contextPlugin') #22 /home/magento2/www/vendor/magento/module-store/App/Action/Plugin/Context.php(98): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http)) #23 [internal function]: Magento\Store\App\Action\Plugin\Context->aroundDispatch(Object(Mateco\LoginAsCustomer\Controller\Login\Index\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http)) #24 /home/magento2/www/vendor/magento/framework/Interception/Chain/Chain.php(68): call_user_func_array(Array, Array) #25 /home/magento2/www/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Mateco\LoginAsC...', 'dispatch', Object(Mateco\LoginAsCustomer\Controller\Login\Index\Interceptor), Array, 'storeCheck') #26 /home/magento2/www/vendor/magento/module-store/App/Action/Plugin/StoreCheck.php(44): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http)) #27 [internal function]: Magento\Store\App\Action\Plugin\StoreCheck->aroundDispatch(Object(Mateco\LoginAsCustomer\Controller\Login\Index\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http)) #28 /home/magento2/www/vendor/magento/framework/Interception/Chain/Chain.php(68): call_user_func_array(Array, Array) #29 /home/magento2/www/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Mateco\LoginAsC...', 'dispatch', Object(Mateco\LoginAsCustomer\Controller\Login\Index\Interceptor), Array, 'tax-app-action-...') #30 /home/magento2/www/vendor/magento/module-tax/Model/App/Action/ContextPlugin.php(91): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http)) #31 [internal function]: Magento\Tax\Model\App\Action\ContextPlugin->aroundDispatch(Object(Mateco\LoginAsCustomer\Controller\Login\Index\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http)) #32 /home/magento2/www/vendor/magento/framework/Interception/Chain/Chain.php(68): call_user_func_array(Array, Array) #33 /home/magento2/www/vendor/magento/framework/Interception/Interceptor.php(136): Magento\Framework\Interception\Chain\Chain->invokeNext('Mateco\LoginAsC...', 'dispatch', Object(Mateco\LoginAsCustomer\Controller\Login\Index\Interceptor), Array, 'weee-app-action...') #34 /home/magento2/www/vendor/magento/module-weee/Model/App/Action/ContextPlugin.php(112): Mateco\LoginAsCustomer\Controller\Login\Index\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http)) #35 [internal function]: Magento\Weee\Model\App\Action\ContextPlugin->aroundDispatch(Object(Mateco\LoginAsCustomer\Controller\Login\Index\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http)) #36 /home/magento2/www/vendor/magento/framework/Interception/Interceptor.php(141): call_user_func_array(Array, Array) #37 /home/magento2/www/var/generation/Mateco/LoginAsCustomer/Controller/Login/Index/Interceptor.php(39): Mateco\LoginAsCustomer\Controller\Login\Index\Interceptor->___callPlugins('dispatch', Array, Array) #38 /home/magento2/www/vendor/magento/framework/App/FrontController.php(55): Mateco\LoginAsCustomer\Controller\Login\Index\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http)) #39 [internal function]: Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http)) #40 /home/magento2/www/vendor/magento/framework/Interception/Interceptor.php(74): call_user_func_array(Array, Array) #41 /home/magento2/www/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array) #42 /home/magento2/www/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'requestPreproce...') #43 /home/magento2/www/vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(89): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http)) #44 [internal function]: Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http)) #45 /home/magento2/www/vendor/magento/framework/Interception/Chain/Chain.php(68): call_user_func_array(Array, Array) #46 /home/magento2/www/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'install') #47 /home/magento2/www/vendor/magento/framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http)) #48 [internal function]: Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http)) #49 /home/magento2/www/vendor/magento/framework/Interception/Chain/Chain.php(68): call_user_func_array(Array, Array) #50 /home/magento2/www/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'front-controlle...') #51 /home/magento2/www/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(73): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http)) #52 [internal function]: Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http)) #53 /home/magento2/www/vendor/magento/framework/Interception/Chain/Chain.php(68): call_user_func_array(Array, Array) #54 /home/magento2/www/vendor/magento/framework/Interception/Interceptor.php(136): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'front-controlle...') #55 /home/magento2/www/vendor/magento/module-page-cache/Model/App/FrontController/VarnishPlugin.php(55): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http)) #56 [internal function]: Magento\PageCache\Model\App\FrontController\VarnishPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http)) #57 /home/magento2/www/vendor/magento/framework/Interception/Interceptor.php(141): call_user_func_array(Array, Array) #58 /home/magento2/www/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array) #59 /home/magento2/www/vendor/magento/framework/App/Http.php(115): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http)) #60 /home/magento2/www/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch() #61 /home/magento2/www/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http)) #62 {main}";s:3:"url";s:138:"/loginascustomer/login/index/secret/Xv4YyvrxhINjqqQf10427n84lbvrIP00rKvJGdjqP4Ok64BFdDhooIOoSefK3zuu/?SID=246a0832faa9eb79a9aa224fef898a01";s:11:"script_name";s:10:"/index.php";}
More information
- If I remove Address form my customer, it's work fine !