-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Event: dmcdindia1Fixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passed
Description
Shipment Create via API salesShipmentRepositoryV1 throw Fatal error in Admin Order -> Shipment -> View
Preconditions (*)
- Magento 2.3.1/2.3.0
- The order created via Admin Panel
Steps to reproduce (*)
- Create an order created from Admin Panel
- Create Shipment via API:
{
"entity": {
"increment_id": "000000003",
"order_id": 3,
"items": [
{
"sku": "WSH12-32-Red",
"qty": 1
}
],
"tracks": [
{
"order_id": 3,
"qty": 1,
"track_number": "123",
"title": "Test",
"carrier_code": "dhl"
}
]
}
}- Goto
Admin -> Sales -> Order -> View -> Shipments -> View
Expected result (*)
- Shipment Details should be rendered without any Fatal Error as API shipment creation was successful.
Actual result (*)
- Fatal Error in Admin Shipment View
Fatal error: Uncaught Error: Call to a member function getParentItem() on null in /opt/lampp7.2/htdocs/magento/2.3.sample/vendor/magento/module-shipping/view/adminhtml/templates/view/items.phtml:19 Stack trace: #0 /opt/lampp7.2/htdocs/magento/2.3.sample/vendor/magento/framework/View/TemplateEngine/Php.php(59): include() #1 /opt/lampp7.2/htdocs/magento/2.3.sample/vendor/magento/framework/View/Element/Template.php(271): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\Shipping\Block\Adminhtml\View\Items), '/opt/lampp7.2/h...', Array) #2 /opt/lampp7.2/htdocs/magento/2.3.sample/vendor/magento/framework/View/Element/Template.php(301): Magento\Framework\View\Element\Template->fetchView('/opt/lampp7.2/h...') #3 /opt/lampp7.2/htdocs/magento/2.3.sample/vendor/magento/module-backend/Block/Template.php(129): Magento\Framework\View\Element\Template->_toHtml() #4 /opt/lampp7.2/htdocs/magento/2.3.sample/vendor/magento/framework/View/Element/AbstractBlock.php(668): Magento\Backend\Block\Template->_toHtml() #5 /opt/lampp7 in /opt/lampp7.2/htdocs/magento/2.3.sample/vendor/magento/module-shipping/view/adminhtml/templates/view/items.phtml on line 19Related Issues:
https://github.com/magento-engcom/msi/issues/2220
#17828
Note:
I think the Shipment creation via API have missed some required data, which is not validated at time of processing the call, causing fatal errors.
Metadata
Metadata
Assignees
Labels
Event: dmcdindia1Fixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passed

