Incompatibility with M2.1.x

Created by Robin Hoang, Modified on Wed, 12 Jun, 2019 at 4:14 PM by Robin Hoang

Issue:

When checkout, I got the error:

Fatal error: Uncaught Error: Call to undefined method Magento\Sales\Api\Data\OrderExtension::setBssCustomfield() in /var/www/html/app/code/Bss/CheckoutCustomField/Model/Observer/Sales/OrderLoadAfter.php:75 Stack trace: #0 /var/www/html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(73): Bss\CheckoutCustomField\Model\Observer\Sales\OrderLoadAfter->execute(Object(Magento\Framework\Event\Observer)) #1 /var/www/html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(61): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod(Object(Bss\CheckoutCustomField\Model\Observer\Sales\OrderLoadAfter), Object(Magento\Framework\Event\Observer)) #2 /var/www/html/vendor/magento/framework/Event/Manager.php(66): Magento\Framework\Event\Invoker\InvokerDefault->dispatch(Array, Object(Magento\Framework\Event\Observer)) #3 /var/www/html/var/generation/Magento/Framework/Event/Manager/Proxy.php(95): Magento\Framework\Event\Manager->dispatch('sales_order_loa...', Array) #4 /var/www/html/vendor/magento/framework/Model in /var/www/html/app/code/Bss/CheckoutCustomField/Model/Observer/Sales/OrderLoadAfter.php on line 75


Solution:  

Could you please remove 2 folders: var/di and var/generation, then flush cache to fix the issue?

If there is any problem, please let us know. 


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article