medusajs / medusa

The world's most flexible commerce platform.
https://medusajs.com
MIT License
26.24k stars 2.67k forks source link

Admin fails to render order details when line items are not linked to a variant #9756

Open Bernix01 opened 1 month ago

Bernix01 commented 1 month ago

Bug report

Describe the bug

One is able to create order using createOrdersWorkflow with lineItems that are no linked to product variants i.e. not providing product_id and variant_id to the line item(s).

Admin dashboard fails to render the order details with console errors showing TypeError: item.variant is undefined

System information

Medusa version (including plugins): v2 Node.js version: 20 Database: postgres Operating system: osx Browser (if relevant): not relevant

Steps to reproduce the behavior

  1. Create an order with createOrdersWorkflow do not provide product_id and variant_id to the line item.
  2. Check admin dashboard, order appears in Orders page
  3. Click the order
  4. Error appears

Expected behavior

Order details are shown

Screenshots

image

Code snippets

If applicable, add code samples to help explain your problem

Additional context

Add any other context about the problem here

olivermrbl commented 1 month ago

@Bernix01, thanks for the report. We will get this patched in the near future.