[DEFECT] GraphQL: Block Editor Contentlets Return Only Identifier and LanguageId
Problem Statement
There is a discrepancy between the Page API and the GraphQL endpoint when retrieving pages with Block Editor fields:
- Page API returns full contentlet data inside Block Editor blocks (title, images, contentType, fields, etc.).
- GraphQL only returns identifier and languageId for contentlets inside Block Editor blocks.
This discrepancy prevents the frontend SDKs (@dotcms/react and @dotcms/angular) from rendering custom blocks properly, since they depend on the full contentlet data being returned.
Steps to Reproduce
- Create a content type with a Block Editor field.
- Add a contentlet (e.g., Product) inside a Block Editor field.
- Request the page via Page API → note full contentlet data is returned.
- Request the same page via GraphQL → only identifier and languageId are returned.
Example Responses
Page API Response (correct/expected):
{
"type": "dotContent",
"attrs": {
"data": {
"identifier": "adf567f9-f8a9-487e-b942-6bc083f677db",
"languageId": 1,
"title": "Patagonia Boys' Baggies 5\" Shorts",
"contentType": "Product",
"image": "http://demo.dotcms.com/dA/adf567f9f8/shorts-blue.jpeg?language_id=1",
"description": "<p>The Patagonia Boys' Baggies™ 5\" Shorts...</p>",
"productNumber": "9133062261900",
"retailPrice": "39.00"
}
}
}
GraphQL Response (incomplete):
{
"type": "dotContent",
"attrs": {
"data": {
"identifier": "adf567f9-f8a9-487e-b942-6bc083f677db",
"languageId": 1
}
}
}
Video
https://github.com/user-attachments/assets/c6fc10d2-5eda-4f8c-85b4-36fc48e5cc6c
Inline Editing Contentlets are Blank (Headless)
https://github.com/user-attachments/assets/010f83c5-684e-4653-bc74-a21367da8394
Acceptance Criteria
- [ ] GraphQL returns full contentlet data inside Block Editor blocks, matching Page API.
- [ ] Ensure consistency between Page API and GraphQL for Block Editor responses.
- [ ] Add tests for Block Editor fields with nested contentlets in GraphQL.
dotCMS Version
main/trunk
Severity
High - Major functionality broken
QA Notes:
You can use this GraphQL query to ask for a blog in this case french-polynesia and checkout that now the Contentlets contain all their properties as happens in the REST API.
GraphQL query:
fragment DotCMSPage on DotPage {
# Basic page metadata
publishDate
type
path
# URL content mapping
urlContentMap {
_map
}
}
query PageContent {
page: page(url: "blog/post/french-polynesia-everything-you-need-to-know"){
...DotCMSPage
}
}
Steps:
- In dotCMS admin panel go to Dev Tools > GraphQL, and use the GraphQL query above to retrieve the french-polynesia blog.
- In the response, search for the word
dotContentthese are the Contentlets being used in the Block Content. - Check that now the Contentlets are full hydrated (contain all the Contenlet information).
Passed QA
- dotCMS Docker Image: [
dotcms/dotcms:trunk_5891eea]
Video
https://github.com/user-attachments/assets/c73236de-5613-40dd-8b98-16f63a443ff0
Team Note
We’re experiencing an issue with dotContent inside tables, and it also occurs in the Page API.
There’s already a ticket tracking this: #33120
Edge Case
I found an edge case where the dotContent array is returning only the identifier and languageId. This only happens on URL Content Maps for a property post-fixed with _raw.
I’m not aware of any client using this property, and I’m not sure why it exists—especially since we’re supposed to serve Block Editor content as JSON.
Video
https://github.com/user-attachments/assets/0e970d99-fd24-4345-b801-5910afe95760
cc: @fmontes @nollymar