medusajs / medusa

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

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

Open Bernix01 opened 2 days ago

Bernix01 commented 2 days 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 day ago

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

blake-runyon commented 6 hours ago

@olivermrbl is this available to pick up? New to the project and think this could be a good first issue for me, please let me know thanks.