[Edit Content]: Key/Value Fields Do Not Display `null` Values After Import
Problem Statement
When importing content using the Content Import API, key/value fields containing null values are silently dropped from the UI. While the data is technically stored, the null values are not visible in either the legacy Edit Content screen or the new Edit Contentlet interface.
This creates confusion for users who expect to see the full structure of the key/value field, including keys with null values, after import.
Steps to Reproduce
- Create a content type (e.g.,
DummyType) with:
titlefieldkeyvaluefield of type Key/Value
- Use the Content Import API to upload the following CSV:
title,keyvalue
"Content Import Null Example","{""my-value"": null}"
- Open the imported content in both the old and new content editing interfaces.
- Observe that the key (
my-value) is missing entirely from the UI.
Video
https://github.com/user-attachments/assets/05187954-88fb-45de-887d-c9a2eb53e904
Expected Behavior
The key/value UI should display keys even when their associated values are null. Users should be able to see that the key exists and optionally choose to edit or remove it.
Acceptance Criteria
- [ ] The
keyvaluefield displays keys withnullvalues in the old Edit Content UI. - [ ] The same behavior is supported in the new Edit Contentlet UI.
- [ ] The UI should not silently discard or hide keys when their value is null.
- [ ] Any limitations or intended behavior related to null-handling are documented clearly in developer or user docs.
dotCMS Version
main/trunk
Proposed Objective
User Experience
Proposed Priority
Priority 4 – Trivial
This is a cool feature, we don't need to block GTM for this, we can add it to the doc and link to this issue for traceability.
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days.
PRs linked to this issue
PRs linked to this issue
QA failed, still having some issues.
If the value is null, it doesn't show up in the old Edit Content view. However, in the new Edit Content view, it is listed but only shows the key (the value is missing)
https://github.com/user-attachments/assets/17cf8b58-ded8-46ff-890d-27788cabcb05