cancel
Showing results for 
Search instead for 
Did you mean: 

No such entity with addressId =

No such entity with addressId =

Hello,

 

I am using Magento 2.2.7 CE and attempted to add a billing and shipping address to a customer account via the backend. It would save the address, however upon refreshing the page the address would disappear. When checking the system.log file, I find the following error message:

 

[2018-12-21 22:24:59] main.WARNING: No such entity with addressId = 
#0 /home/passionh/public_html/vendor/magento/module-customer/Model/AddressRegistry.php(49): Magento\Framework\Exception\NoSuchEntityException::singleField('addressId', NULL)
#1 /home/passionh/public_html/vendor/magento/module-customer/Model/ResourceModel/AddressRepository.php(168): Magento\Customer\Model\AddressRegistry->retrieve(NULL)
#2 /home/passionh/public_html/vendor/vertex/module-tax/Model/AddressDeterminer.php(107): Magento\Customer\Model\ResourceModel\AddressRepository->getById(NULL)
#3 /home/passionh/public_html/vendor/vertex/module-tax/Model/AddressDeterminer.php(72): Vertex\Tax\Model\AddressDeterminer->getDefaultShipping('358')
#4 /home/passionh/public_html/vendor/vertex/module-tax/Model/VertexUsageDeterminer.php(61): Vertex\Tax\Model\AddressDeterminer->determineAddress(Object(Magento\Quote\Model\Quote\Address), '358', false)
#5 /home/passionh/public_html/vendor/vertex/module-tax/Model/Plugin/SubtotalPlugin.php(61): Vertex\Tax\Model\VertexUsageDeterminer->shouldUseVertex(1, Object(Magento\Quote\Model\Quote\Address), '358', false)
#6 /home/passionh/public_html/vendor/magento/framework/Interception/Interceptor.php(135): Vertex\Tax\Model\Plugin\SubtotalPlugin->aroundCollect(Object(Magento\Tax\Model\Sales\Total\Quote\Subtotal\Interceptor), Object(Closure), Object(Magento\Quote\Model\Quote\Interceptor), Object(Magento\Quote\Model\ShippingAssignment), Object(Magento\Quote\Model\Quote\Address\Total))
#7 /home/passionh/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Tax\Model\Sales\Total\Quote\Subtotal\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Quote\Model\Quote\Interceptor), Object(Magento\Quote\Model\ShippingAssignment), Object(Magento\Quote\Model\Quote\Address\Total))
#8 /home/passionh/public_html/generated/code/Magento/Tax/Model/Sales/Total/Quote/Subtotal/Interceptor.php(26): Magento\Tax\Model\Sales\Total\Quote\Subtotal\Interceptor->___callPlugins('collect', Array, NULL)
#9 /home/passionh/public_html/vendor/magento/module-quote/Model/Quote/TotalsCollector.php(265): Magento\Tax\Model\Sales\Total\Quote\Subtotal\Interceptor->collect(Object(Magento\Quote\Model\Quote\Interceptor), Object(Magento\Quote\Model\ShippingAssignment), Object(Magento\Quote\Model\Quote\Address\Total))
#10 /home/passionh/public_html/vendor/magento/module-quote/Model/Quote/TotalsCollector.php(144): Magento\Quote\Model\Quote\TotalsCollector->collectAddressTotals(Object(Magento\Quote\Model\Quote\Interceptor), Object(Magento\Quote\Model\Quote\Address))
#11 /home/passionh/public_html/vendor/magento/module-quote/Model/Quote.php(1959): Magento\Quote\Model\Quote\TotalsCollector->collect(Object(Magento\Quote\Model\Quote\Interceptor))
#12 /home/passionh/public_html/vendor/magento/module-sales/Model/AdminOrder/Create.php(447): Magento\Quote\Model\Quote->collectTotals()
#13 /home/passionh/public_html/vendor/magento/module-sales/Controller/Adminhtml/Order/Create.php(274): Magento\Sales\Model\AdminOrder\Create->saveQuote()
#14 /home/passionh/public_html/vendor/magento/module-sales/Controller/Adminhtml/Order/Create.php(134): Magento\Sales\Controller\Adminhtml\Order\Create->_processActionData()
#15 /home/passionh/public_html/vendor/magento/module-sales/Controller/Adminhtml/Order/Create/LoadBlock.php(55): Magento\Sales\Controller\Adminhtml\Order\Create->_processData()
#16 /home/passionh/public_html/vendor/magento/framework/App/Action/Action.php(107): Magento\Sales\Controller\Adminhtml\Order\Create\LoadBlock->execute()
#17 /home/passionh/public_html/vendor/magento/module-backend/App/AbstractAction.php(235): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#18 /home/passionh/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Backend\App\AbstractAction->dispatch(Object(Magento\Framework\App\Request\Http))
#19 /home/passionh/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Sales\Controller\Adminhtml\Order\Create\LoadBlock\Interceptor->___callParent('dispatch', Array)
#20 /home/passionh/public_html/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(143): Magento\Sales\Controller\Adminhtml\Order\Create\LoadBlock\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#21 /home/passionh/public_html/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch(Object(Magento\Sales\Controller\Adminhtml\Order\Create\LoadBlock\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#22 /home/passionh/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Sales\Controller\Adminhtml\Order\Create\LoadBlock\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#23 /home/passionh/public_html/generated/code/Magento/Sales/Controller/Adminhtml/Order/Create/LoadBlock/Interceptor.php(26): Magento\Sales\Controller\Adminhtml\Order\Create\LoadBlock\Interceptor->___callPlugins('dispatch', Array, NULL)
#24 /home/passionh/public_html/vendor/magento/framework/App/FrontController.php(55): Magento\Sales\Controller\Adminhtml\Order\Create\LoadBlock\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#25 /home/passionh/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#26 /home/passionh/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#27 /home/passionh/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#28 /home/passionh/public_html/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#29 /home/passionh/public_html/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#30 /home/passionh/public_html/generated/code/Magento/Framework/App/Http/Interceptor.php(24): Magento\Framework\App\Http->launch()
#31 /home/passionh/public_html/vendor/magento/framework/App/Bootstrap.php(257): Magento\Framework\App\Http\Interceptor->launch()
#32 /home/passionh/public_html/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))

Any ideas on what I can do to fix this? I have searched extensively throughout the forums and google, however nobody has offered a confirmed solution. Apparently this issue was marked as fixed for the 2.2.7 and 2.3 release, however it is still very much present.

 

Thank you.

2 REPLIES 2

Re: No such entity with addressId =

Hi @Bergerman,

 

Actually quote_address table have some non exist customer_address_id column records, we need to set NULL to those records. Below is query for the same.

 

UPDATE quote_address SET customer_address_id=NULL where address_id IN ( select address_id from quote_address where ( customer_address_id is NOT NULL AND customer_address_id NOT IN ( select entity_id from customer_address_entity)) );

Prema M

Re: No such entity with addressId =


@prema_mani1 wrote:

Hi @Bergerman,

 

Actually quote_address table have some non exist customer_address_id column records, we need to set NULL to those records. Below is query for the same.

 

UPDATE quote_address SET customer_address_id=NULL where address_id IN ( select address_id from quote_address where ( customer_address_id is NOT NULL AND customer_address_id NOT IN ( select entity_id from customer_address_entity)) );


Since upgrading to 2.2.7 I've been seeing this error like crazy. It happened before but now it happens all the time. We have BugSnag monitoring and on a busy site we are seeing the error 50 times a day easy.

 

We have run the query above, and set the non-existent entries to NULL, but new ones are created every day and there is no change to the number of errors that are reported. Seems to be a bigger issue. I've noticed that if a visitor calls us and is experiencing some issue that appears to be reporting this in the backend, normally clearing their cookies fixes the issue, but this isn't a solution as we have a lot of people not calling.