canadasatellite-ca / site

The canadasatellite.ca website (Magento 2)
https://upwork.com/fl/mage2pro
0 stars 1 forks source link

`MageWorx_OrderEditor`: «Argument 1 passed to Magento\Sales\Model\Order\Invoice\Item::setOrderItem() must be an instance of Magento\Sales\Model\Order\Item, null given, called in vendor/magento/module-sales/Model/ResourceModel/Order/Invoice/Relation.php on line 54» #235

Closed dmitrii-fediuk closed 3 years ago

dmitrii-fediuk commented 3 years ago
[
    {
        "mage2pro/core": "7.7.1",
        "Magento": "2.3.5-p2",
        "PHP": "7.2.34-8+ubuntu16.04.1+deb.sury.org+1",
        "IP Address": "172.219.3.84",
        "Referer": "https://www.canadasatellite.ca/admin_1st8gu/sales/order/view/order_id/54512/",
        "Request Method": "POST",
        "URL": "https://www.canadasatellite.ca/admin_1st8gu/ordereditor/edit/items/",
        "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.63 Safari/537.36",
        "Post": {
            "form_key": "P8ynDjS6aArcqfyE",
            "order_id": "54512",
            "block_id": "order_items",
            "item": {
                "102340": {
                    "item_id": "102340",
                    "item_type": "order",
                    "product_id": "5469",
                    "discount_tax_compensation_amount": "0.00",
                    "weee_tax_applied_row_amount": "0.00",
                    "price": "89.92",
                    "price_incl_tax": "103.41",
                    "fact_qty": "1",
                    "subtotal": "89.92",
                    "subtotal_incl_tax": "103.41",
                    "tax_amount": "13.49",
                    "row_total": "103.41",
                    "action": ""
                },
                "102341": {
                    "product_options": "",
                    "sku": "",
                    "item_id": "102341",
                    "item_type": "order",
                    "product_id": "5472",
                    "discount_tax_compensation_amount": "0.00",
                    "weee_tax_applied_row_amount": "0.00",
                    "price": "55.00",
                    "price_incl_tax": "0.00",
                    "fact_qty": "1",
                    "qty_item_in_bundle": "1",
                    "parent": "102340",
                    "subtotal": "0.00",
                    "subtotal_incl_tax": "0.00",
                    "tax_amount": "0.00",
                    "tax_percent": "0.00",
                    "discount_amount": "0.00",
                    "discount_percent": "0.00",
                    "row_total": "0.00",
                    "action": "",
                    "back_to_stock": "1"
                },
                "102342": {
                    "product_options": "",
                    "sku": "",
                    "item_id": "102342",
                    "item_type": "order",
                    "product_id": "5483",
                    "discount_tax_compensation_amount": "0.00",
                    "weee_tax_applied_row_amount": "0.00",
                    "price": "37.50",
                    "price_incl_tax": "0.00",
                    "fact_qty": "1",
                    "qty_item_in_bundle": "1",
                    "parent": "102340",
                    "subtotal": "0.00",
                    "subtotal_incl_tax": "0.00",
                    "tax_amount": "0.00",
                    "tax_percent": "0.00",
                    "discount_amount": "0.00",
                    "discount_percent": "0.00",
                    "row_total": "0.00",
                    "action": "",
                    "back_to_stock": "1"
                },
                "102343": {
                    "product_options": "",
                    "sku": "",
                    "item_id": "102343",
                    "item_type": "order",
                    "product_id": "7625",
                    "discount_tax_compensation_amount": "0.00",
                    "weee_tax_applied_row_amount": "0.00",
                    "action": "remove",
                    "back_to_stock": "1"
                }
            }
        }
    }
]
************************************
[E_ERROR] Uncaught TypeError: Argument 1 passed to Magento\Sales\Model\Order\Invoice\Item::setOrderItem() must be an instance of Magento\Sales\Model\Order\Item, null given, called in vendor/magento/module-sales/Model/ResourceModel/Order/Invoice/Relation.php on line 54 and defined in vendor/magento/module-sales/Model/Order/Invoice/Item.php:129
Stack trace:
#0 vendor/magento/module-sales/Model/ResourceModel/Order/Invoice/Relation.php(54): Magento\Sales\Model\Order\Invoice\Item->setOrderItem(NULL)
#1 vendor/magento/framework/Model/ResourceModel/Db/VersionControl/RelationComposite.php(48): Magento\Sales\Model\ResourceModel\Order\Invoice\Relation->processRelation(Object(Magento\Sales\Model\Order\Invoice\Interceptor))
#2 vendor/magento/framework/Model/ResourceModel/Db/VersionControl/AbstractDb.php(73): Magento\Fra
File: vendor/magento/module-sales/Model/Order/Invoice/Item.php
Line: 129
dmitrii-fediuk commented 3 years ago

It is oссured on deleting an order item: FireShot Capture 014 - #194725 _ Orders _ Operations _ Sales _ Magento Admin - localhost com

01