Some of the Liquid Content properties that are retrieved via the API may be blank, but those properties have a value in the Content Items. Specifically, there are a couple of dropdown fields that are returning an empty array in the response.
This article explains the behaviour regarding Liquid Content API requests returning empty fields.
In the example below, the Branch Type field is populated in the UI, but in the JSON response, it is empty.
To reproduce the behavior described above, do the following:
Create a new Content Type.
Add a few Content Items for the newly created Content Type.
Add a new dropdown field to the existing Content Type.
Save the changes. As expected, all of the previously created Content Items do not have the created field when querying the API.
Visit one of the Content Items (from the Content > Content Library menu in the Persona Bar) and hit the Save button without making any changes to the new dropdown field.
This results in the Content Item having the new field added, but it will be empty.
The reason the field appears to be populated in the UI is due to it loading the first value for the dropdown from the Content Type data.
Please note that this only affects previously created items, and all the new Content Items should have the value populated without any problems.
Please sign in to leave a comment.