Skip to content

[Bug]: Medusa Admin CSV import fails with "Invalid column name(s)" even for common fields #12794

Description

@paulius-bulotas

Package.json file

{
  "name": "medusajs",
  "version": "0.0.1",
  "description": "A starter for Medusa projects.",
  "author": "Medusa (https://medusajs.com)",
  "license": "MIT",
  "keywords": [
    "sqlite",
    "postgres",
    "typescript",
    "ecommerce",
    "headless",
    "medusa"
  ],
  "scripts": {
    "build": "medusa build",
    "seed": "medusa exec ./src/scripts/seed.ts",
    "start": "medusa start",
    "dev": "medusa develop",
    "test:integration:http": "TEST_TYPE=integration:http NODE_OPTIONS=--experimental-vm-modules jest --silent=false --runInBand --forceExit",
    "test:integration:modules": "TEST_TYPE=integration:modules NODE_OPTIONS=--experimental-vm-modules jest --silent --runInBand --forceExit",
    "test:unit": "TEST_TYPE=unit NODE_OPTIONS=--experimental-vm-modules jest --silent --runInBand --forceExit"
  },
  "dependencies": {
    "@medusajs/admin-sdk": "2.8.4",
    "@medusajs/cli": "2.8.4",
    "@medusajs/framework": "2.8.4",
    "@medusajs/medusa": "2.8.4",
    "@mikro-orm/core": "6.4.3",
    "@mikro-orm/knex": "6.4.3",
    "@mikro-orm/migrations": "6.4.3",
    "@mikro-orm/postgresql": "6.4.3",
    "awilix": "^8.0.1",
    "pg": "^8.13.0"
  },
  "devDependencies": {
    "@medusajs/test-utils": "2.8.4",
    "@mikro-orm/cli": "6.4.3",
    "@swc/core": "1.5.7",
    "@swc/jest": "^0.2.36",
    "@types/jest": "^29.5.13",
    "@types/node": "^20.0.0",
    "@types/react": "^18.3.2",
    "@types/react-dom": "^18.2.25",
    "jest": "^29.7.0",
    "prop-types": "^15.8.1",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "ts-node": "^10.9.2",
    "typescript": "^5.6.2",
    "vite": "^5.2.11",
    "yalc": "^1.0.0-pre.53"
  },
  "engines": {
    "node": ">=20"
  }
}

Node.js version

v22.16.0

Database and its version

psql (PostgreSQL) 15.13

Operating system name and version

Linux domain.eu 6.1.0-37-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.140-1 (2025-05-22) x86_64 GNU/Linux

Browser name

Google Chrome Version 137.0.7151.120 (Official Build) (64-bit)

What happended?

I tried importing a product CSV file using Medusa Admin (v2.8.4), but the import fails with this error:

Invalid column name(s) "Product Collection Title", "Product Collection Handle", "Product Type", "Product Profile Name", "Product Profile Type", "Variant Inventory Quantity", "Price EUR", "Price USD", "Option 1 Name", "Option 1 Value", "Image 1 Url", "Image 2 Url"

These columns come either from previous CSV templates or from exported data. Some of them seem essential for typical ecommerce setups, like pricing, options, product type, or image URLs.

Currently, the admin does not accept these fields and returns a 400 Bad Request, rejecting the entire import even if required fields like Product Title and Variant SKU are valid.

It would help if the import tool:

  • either ignored unknown columns,
    
  • or allowed mapping them to supported fields,
    
  • or provided a clear, up-to-date list of acceptable headers in the UI or documentation.
    

I am using Medusa v2.8.4, PostgreSQL 16.2, and Debian 12. Screenshots and test files can be attached if needed.

Let me know if you need help reproducing - the issue is 100% consistent with any file that includes unsupported column headers.

Expected behavior

The product CSV import should accept files that contain required fields and ignore any additional unsupported columns. At minimum, it should import all valid data and skip or warn about extra fields without failing entirely.

Alternatively, the admin UI could:

  • link to the exact list of allowed column headers,
    
  • validate files before upload,
    
  • or allow users to map unsupported fields manually.
    

This would make the import process much more flexible and user-friendly, especially when working with exported data or shared templates.

Actual behavior

When uploading a CSV file that contains unsupported column headers, the entire import fails immediately with a 400 Bad Request.

The admin shows a generic error message listing the invalid columns, but there is no indication of which columns are accepted or how to fix the issue. Even when required fields like Product Title, Product Handle, and Variant SKU are present and correct, the import does not proceed.

This blocks importing otherwise valid product data and creates unnecessary friction for users working with legacy templates or exported files.

Link to reproduction repo

https://github.com/xedusa/ecommerce

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions