Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Shipment Record via API generates garbled Shipment Details View #5007

Closed
ipekerti opened this issue Jun 13, 2016 · 2 comments
Closed
Assignees

Comments

@ipekerti
Copy link

On M2 Community v2.0.6

Steps to reproduce

  1. Successfully POSTed a shipment record to an order via API, supplying minimal shipment data

POST: https://m2dev.mydomain.com/index.php/rest/V1/shipment/

{
"entity": {
"order_id": "3"
,"items": [{
"order_item_id": "1"
,"qty": "2"
,"description": "test-20160612-2"
,"sku": "SPCTOOL"
}]
}
}

Expected result (REST response):

{"created_at":"2016-06-12 22:07:10","entity_id":17,"increment_id":"SHI-000000003","order_id":3,"packages":[],"updated_at":"2016-06-12 22:07:10","items":[{"entity_id":17,"order_item_id":1,"parent_id":17,"qty":1,"sku":"SPCTOOL"}],"tracks":[],"comments":null}

However, when viewing (drilling down to) the shipment detail record via the admin site as an admin user, the detail display gets garbled. It seems that it's missing some sort of header for the display not to render properly.

This does not happen if the shipment record was added manually via the admin control panel.

Would anyone have any idea what might be causing this? Am I missing some shipment elements to pass in the API call? According to the docs, I'm already passing more than the required data elements.

Thanks!
ipekerti

shipment-view
shipment-detail-garbled.pdf
shipment-detail-ok-when-added-manually.pdf

@NadiyaS NadiyaS added the CS label Jun 14, 2016
@NadiyaS NadiyaS self-assigned this Jun 14, 2016
@ipekerti
Copy link
Author

Just wanted to add that the shipment detail view also gets messed up from the user's front end.

shipment-frontend-garbled

@ipekerti
Copy link
Author

Figured out what I did wrong. I wasn't using the correct primary key for the line table for the order_item_id element.

It is a bit strange that the API considers it a successful transaction since it expects both order_id and order_item_id, but does not seem to perform any verification of the association between them at all.

magento-engcom-team pushed a commit that referenced this issue Nov 11, 2019
- fixed Catalog Pagination doesn't work on Elasticsearch 6.x (2.3.4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants