[Content Import] Import fails if Identifier column does not find a match
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
Problem Statement
When exporting/importing content from one dotCMS instance to another, the typical unmodified export will begin with an identifier column. Our documentation states (emphasis mine):
When the CSV file contains an identifier column, the dotCMS identifier for each imported item will be matched with content identifiers already in the system. Content with matching identifiers will be automatically updated by the import.
- When you export content from dotCMS to a CSV file, the identifier column is always included.
- If no dotCMS content exists that matches the value in the identifier column, then dotCMS will attempt to match the values of any Key Fields in the imported content.
- If neither the the values in the identifier column nor the Key Fields match, then the content will be imported as new content.
- When the identifier field is present it will always be used.
However, my attempts to import new content onto a separate instance failed; it could not find an identifier match, so it terminated the operation outright instead of creating new content.
Further info:
- Sys logs: https://gist.github.com/jdcmsd/44f74038dc385ecfa97ccc3ee08ec688
- Example exported contentlet (CSV): [export24.09.25.csv](https://github.com/user-attachments/files/21125210/export24.09.25.csv)
- Relevant content type (JSON): [build.json](https://github.com/user-attachments/files/21124521/build.json)
See also: Lack of identifier match explicitly described as an error:
Steps to Reproduce
Short:
- Create content type from JSON file above
- Attempt to import content from CSV file
- Import fails
- Delete identifier column from CSV
- Attempt import again
- Success
Long:
- Ensure two dotCMS instances have the same content type
- Create a contentlet on one of them
- Export it
- Import it on the second instance
- Import fails
- Delete Identifier column from CSV
- Import again
- Import succeeds
Acceptance Criteria
The presence of an Identifier column (a basic element of all content exports) should never cause an import to fail. If the system finds no match for an identifier, or any other selected Key Field(s), then it should proceed to create a new contentlet.
dotCMS Version
25.06.30-1
Proposed Objective
Core Features
Proposed Priority
Priority 3 - Average
External Links... Slack Conversations, Support Tickets, Figma Designs, etc.
https://dotcms.slack.com/archives/C028Z3R2D/p1751922654506569
Assumptions & Initiation Needs
No response
Quality Assurance Notes & Workarounds
No response
Sub-Tasks & Estimates
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure using build.json to create the content type and export*24.09.25.csv as described, then review the linked system logs and the content import flow. Verify the behavior with and without the Identifier column. Done means an unmatched Identifier or Key Field allows a new contentlet to be created instead of terminating the import.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, content
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100