0

From the backend when I try to place a new order and when I try to add new products, I'm getting following error

PHP Fatal error:  Uncaught Error: Call to a member function checkData() on null in /public_html/vendor/magento/module-sales/Model/AdminOrder/Create.php:1046
Stack trace:
#0 /public_html/vendor/magento/module-sales/Model/AdminOrder/Create.php(1063): Magento\Sales\Model\AdminOrder\Create->addProduct(Object(Magento\Catalog\Model\Product\Interceptor), Object(Magento\Framework\DataObject))
#1 public_html/vendor/magento/module-sales/Controller/Adminhtml/Order/Create.php(229): Magento\Sales\Model\AdminOrder\Create->addProducts(Array)
#2 public_html/vendor/magento/module-sales/Controller/Adminhtml/Order/Create.php(134): Magento\Sales\Controller\Adminhtml\Order\Create->_processActionData()
#3 public_html/vendor/magento/module-sales/Controller/Adminhtml/Order/Create/LoadBlock.php(55): Magento\Sales\Controller\Adminhtml\Order\Create->_processData()
#4 public_html/generated/code/Magento/Sales/Controller/Adminhtml/Order/Cre in public_html/vendor/magento/module-sales/Model/AdminOrder/Create.php on line 1046

and in front, I'm getting following JS error.

POST https://test.test.com/admin/sales/order_create/loadBlock/key/9ef9328c45ba526d9cfffa10c9da9390cb3aa4e17a4b72c2c9fd1556b64432ec/block/search,items,shipping_method,totals,giftmessage,billing_method?isAjax=true 500 ()

I've made no changes to this process not even added in other modules for that.

0

Please comment code $item->checkData() in that file and function so it will work . You need to override that file but for now you can edit directly as it is Magento 2 bug .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.