Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
Master
-
2
-
S04E30 - Sea Change
Description
When you don't provide content fields in a structured content of a content structure with no required fields, a NullPointerException is thrown when the field has no default value.
Steps to reproduce:
- Create a Web Content Structure with one non-required field and no default value (or use Basic Web Content)
- Create a Structured Content through APIs sending a request with only title and contentStructureId
curl -H "Content-Type: application/json" -X POST "http://localhost:8080/o/headless-delivery/v1.0/sites/{siteId}/structured-contents" -d "{\"contentStructureId\": {contentStructureId}, \"title\": \"Test Article\"}" -u "[email protected]:test"
Remember to replace the {siteId} in the path and the {contentStructureId} in the body with valid ids in your portal instance
Result: A 500 Internal Server Error status code is returned and a NullPointerException is logged in the server
Expected Result: The Structured Content is created successfully and a 200 status code is returned