Issue
- When trying to filter Content Structure ( WebContent > Structures ), and using a wrong syntax, you might get any of the following errors:
-
Exception while fetching data (/contentStructureStructuredContents) : null
-
"Internal Server Error",classification": "DataFetchingException"
-
"contentStructureStructuredContents": null
Environment
- Liferay DXP 7.4
Resolution
- You should use the following template for the request:
{
You can find and edit the structure's field reference when clicking on the text field and opening the “Advanced” tab.
contentStructureStructuredContents(contentStructureId: <yourContentStructureId>, filter: "contentFields/yourStructureFieldReference eq 'yourWebContentTextEntry'") {
items {
id
contentFields {
contentFieldValue {
data
}
label
}
}
}
}
Note: You should change the contentStructureId to your own.
Subscriber Exclusive Content
A Liferay Enterprise Subscription provides access to over 1,500 articles that include best practices, troubleshooting, and other valuable solutions. Sign in for full access.
Sign In