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
Cannot Save Customers on 2.4.6 compatible version #364
Comments
Hi @saderra, |
@smolentzov-stripe I am also facing the same issue. Just try to edit and resave the customer. It will return this error. |
Even I am getting this on 2.4.6 Steps to reproduce
|
I also am getting this same error. |
I was unable to save customers also. I debugged it and the attribute on line 80 did not exist. tj_last_sync I created this tool to run to create the attribute and it works and am able to save customers now `<?php use Magento\Framework\App\Bootstrap; require '../app/bootstrap.php'; $bootstrap = Bootstrap::create(BP, $_SERVER); /** @var EavSetupFactory $eavSetupFactory */ /** @var ModuleDataSetupInterface $moduleDataSetup */ /** @var Config $eavConfig */ $state = $objectManager->get('Magento\Framework\App\State'); $setup = $eavSetupFactory->create(['setup' => $moduleDataSetup]); $attributeCode = 'tj_last_sync';
} echo "Attribute creation complete.\n"; If you need help let me know |
The eav attributes related to Tax Jar are nonmandatory or with a null default value, so any customer who doesn't have this value stored against the customer data will throw this error. Following is the patch you can use to fix this error |
The above patch allowed me to save customers now and makes sense. |
Update: so i can save a customer, but the TaxJar Last Sync Date, TaxJar Exemption Type, TaxJar Exempt Regions do not save. So I change them, hit save and continue and they back at default. Update 2: TaxJar Exemption Type is available to edit in the customer grid. I can change it there and it holds, but the other two fields are not available on the grid. |
Yes, you need to add the attribute I posted above, I am able to save the data you mentioned and update it on customer save with no errors. |
As an alternative, I add these fields to the
From what I can see, these fields are defined as |
With your update for 2.4.6, customers cannot be saved. This is the error:
[2023-07-26T17:12:15.188870+00:00] main.CRITICAL: Error: Call to a member function getValue() on null in /var/www/mage/vendor/taxjar/module-taxjar/Observer/Customer/Save.php:55
Stack trace:
#0 /var/www/mage/vendor/magento/framework/Event/Invoker/InvokerDefault.php(88): Taxjar\SalesTax\Observer\Customer\Save->execute()
#1 /var/www/mage/vendor/magento/framework/Event/Invoker/InvokerDefault.php(74): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod()
#2 /var/www/mage/vendor/magento/framework/Event/Manager.php(65): Magento\Framework\Event\Invoker\InvokerDefault->dispatch()
#3 /var/www/mage/generated/code/Magento/Framework/Event/Manager/Proxy.php(95): Magento\Framework\Event\Manager->dispatch()
#4 /var/www/mage/vendor/magento/module-customer/Controller/Adminhtml/Index/Save.php(360): Magento\Framework\Event\Manager\Proxy->dispatch()
#5 /var/www/mage/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Customer\Controller\Adminhtml\Index\Save->execute()
#6 /var/www/mage/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Customer\Controller\Adminhtml\Index\Save\Interceptor->___callParent()
#7 /var/www/mage/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Customer\Controller\Adminhtml\Index\Save\Interceptor->Magento\Framework\Interception{closure}()
#8 /var/www/mage/generated/code/Magento/Customer/Controller/Adminhtml/Index/Save/Interceptor.php(23): Magento\Customer\Controller\Adminhtml\Index\Save\Interceptor->___callPlugins()
#9 /var/www/mage/vendor/magento/framework/App/Action/Action.php(111): Magento\Customer\Controller\Adminhtml\Index\Save\Interceptor->execute()
#10 /var/www/mage/vendor/magento/module-backend/App/AbstractAction.php(151): Magento\Framework\App\Action\Action->dispatch()
#11 /var/www/mage/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Backend\App\AbstractAction->dispatch()
#12 /var/www/mage/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Customer\Controller\Adminhtml\Index\Save\Interceptor->___callParent()
#13 /var/www/mage/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(145): Magento\Customer\Controller\Adminhtml\Index\Save\Interceptor->Magento\Framework\Interception{closure}()
#14 /var/www/mage/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch()
#15 /var/www/mage/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Customer\Controller\Adminhtml\Index\Save\Interceptor->Magento\Framework\Interception{closure}()
#16 /var/www/mage/generated/code/Magento/Customer/Controller/Adminhtml/Index/Save/Interceptor.php(32): Magento\Customer\Controller\Adminhtml\Index\Save\Interceptor->___callPlugins()
#17 /var/www/mage/vendor/magento/framework/App/FrontController.php(245): Magento\Customer\Controller\Adminhtml\Index\Save\Interceptor->dispatch()
#18 /var/www/mage/vendor/magento/framework/App/FrontController.php(212): Magento\Framework\App\FrontController->getActionResponse()
#19 /var/www/mage/vendor/magento/framework/App/FrontController.php(147): Magento\Framework\App\FrontController->processRequest()
#20 /var/www/mage/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch()
#21 /var/www/mage/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent()
#22 /var/www/mage/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}()
#23 /var/www/mage/generated/code/Magento/Framework/App/FrontController/Interceptor.php(23): Magento\Framework\App\FrontController\Interceptor->___callPlugins()
#24 /var/www/mage/vendor/magento/framework/App/Http.php(116): Magento\Framework\App\FrontController\Interceptor->dispatch()
#25 /var/www/mage/generated/code/Magento/Framework/App/Http/Interceptor.php(23): Magento\Framework\App\Http->launch()
#26 /var/www/mage/vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http\Interceptor->launch()
#27 /var/www/mage/pub/index.php(30): Magento\Framework\App\Bootstrap->run()
#28 {main} {"exception":"[object] (Error(code: 0): Call to a member function getValue() on null at /var/www/mage/vendor/taxjar/module-taxjar/Observer/Customer/Save.php:55)"} []
The text was updated successfully, but these errors were encountered: