[DEFECT] Block Editor node() returns incomplete contentlet data — missing fields like categories
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
Problem Statement
When using the @dotcms SDK with custom components designed to work as contentlets inside the Block Editor, the data retrieved via node() is incomplete compared to the data retrieved via contentlet().
When the contentlet is used as a drag-and-drop (D&D) component, all fields are returned correctly via contentlet(). However, when the same content type is used as a contentlet inside the Block Editor, the node() response is missing fields — most notably the "targeting" category field is completely absent.
This likely indicates that the Block Editor's backend content fetching does not use a sufficient content depth (e.g., depth 2 or 3) when resolving contentlet data for embedded content nodes. The deeper depth is needed to fully resolve related/nested fields like categories.
Impact: Any custom Block Editor component that depends on category fields or other relational fields will receive incomplete data, breaking the component's functionality when rendered inside the Block Editor.
Technology: Java (Backend)
Steps to Reproduce
- Create a content type (e.g., "Disclaimer") with a category field ("Targeting") and a Block Editor field
- Create a contentlet of that type, filling in all fields including the category
- Use the
@dotcmsSDK to build a custom component for this content type - Embed the contentlet inside a Block Editor field of another content
- In the custom component, log
this.node()to the console - Observe that the
targeting(category) field is missing from thenode()data - Compare with
this.contentlet()output when the same contentlet is used as a D&D component — all fields includingtargetingare present
Acceptance Criteria
- When a contentlet is embedded inside a Block Editor,
node()must return the complete contentlet data including all fields (categories, relationships, etc.) - The Block Editor backend content fetching should use an appropriate content depth (depth 2 or 3) to fully resolve relational fields like categories
- The data returned by
node()for an embedded contentlet should be consistent with the data returned bycontentlet()for the same content - Existing Block Editor functionality must not regress
Severity
Medium - Some functionality impacted
Links
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
Start by tracing the Block Editor backend content fetching used by node() and compare it with contentlet() for an embedded contentlet. Verify how category and relationship fields are resolved, then confirm that node() returns the complete data without regressing existing Block Editor behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100